Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PlayerInfo[playerid][pObject][xx] = CreateDynamicObject(PhotoInfo[xx][obj_model], PhotoInfo[xx][obj_x], PhotoInfo[xx][obj_y], PhotoInfo[xx][obj_z], 0.00, 0.00, 0.00, -1, -1, playerid, 100.0);
- hook OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if(PRESSED(KEY_FIRE) && GetPlayerWeapon(playerid) == 43)
- {
- for(new xx = 1; xx <= questobjectss; xx++)
- {
- if(GetPlayerCameraMode(playerid) == 46 && GetPlayerCameraTargetDynObject(playerid) == PlayerInfo[playerid][pObject][xx])
- {
- if(PlayerInfo[playerid][pFoundObject][xx] == 0)
- {
- if(GetPVarInt(playerid, "pickup_time") && GetPVarInt(playerid, "pickup_time") > gettime())
- return SCMF(playerid, COLOR_GREY, "You need to wait %i seconds before photo another object.", GetPVarInt(playerid, "pickup_time")-gettime());
- new string[128];
- SetPVarInt(playerid, "pickup_time", 120+gettime());
- DestroyDynamicObject(PlayerInfo[playerid][pObject][xx]);
- PlayerInfo[playerid][pObject][xx] = 0;
- PlayerInfo[playerid][pFoundObject][xx] = 1;
- new objectsfound,query[256];
- mysql_format(SQL, query, sizeof(query), "UPDATE `users` SET `Object%d`='1' WHERE `name`='%s'", xx, PlayerInfo[playerid][pNormalName]);
- mysql_tquery(SQL, query, "", "");
- for(new x; x <= questobjectss; x++)
- {
- if(PlayerInfo[playerid][pFoundObject][x] == 1) objectsfound++;
- }
- format(string, sizeof(string), "[quest updated]: %d/%d objects found", objectsfound, questobjectss);
- SCM(playerid, COLOR_ORANGE, string);
- if(objectsfound == questobjectss)
- {
- new name[30];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "%s (%d) a gasit cele %d obiecte ascunse si a castigat un premiu special!", name, playerid);
- foreach(new p : Player)
- {
- SCM(p, COLOR_GREY, string);
- }
- new money = 20*(PlayerInfo[playerid][pLevel] * (3000 + random(2000)));
- PlayerInfo[playerid][pAccount] += money;
- PlayerInfo[playerid][pExp] += 20;
- PlayerInfo[playerid][pRob] += 20;
- PlayerInfo[playerid][pHiddenColor] += 2;
- Update(playerid,pRP);
- Update(playerid,pRob);
- Update(playerid,pCashx);
- Update(playerid,pHiddenColorx);
- SCM(playerid, -1, "-------------------------------------------------------");
- SCM(playerid, COLOR_ADMCHAT, "Ai completat quest-ul special si ai primit drept urmare:");
- SCM(playerid, COLOR_ADMCHAT, "20 Respect Poiunts, 20 Rob Points, 1 slot pentru vehicule, 2 culori hidden");
- SCM(playerid, -1, "-------------------------------------------------------");
- new total,str2[256];
- for(new v; v < MAX_PERSONAL_VEHICLES; v++)
- {
- if(PlayerInfo[playerid][pCar][v] != -1) total++;
- }
- if(total+1 > PlayerInfo[playerid][pCarSlots])
- {
- if(PlayerInfo[playerid][pCarSlots] < MAX_PERSONAL_VEHICLES)
- {
- PlayerInfo[playerid][pCarSlots] += 1;
- mysql_format(SQL,str2,sizeof(str2),"UPDATE users SET `CarSlots`='%d' WHERE `name`='%s'",PlayerInfo[playerid][pCarSlots],PlayerInfo[playerid][pNormalName]);
- mysql_tquery(SQL,str2,"","");
- }
- }
- else SendClientMessage(playerid, COLOR_COOLRED, "ERROR: Maximum vehicle slots reached.");
- }
- }
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement