Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/getpersonalcar", true) == 0 || strcmp(cmd, "/getpcar", true) == 0)
- {
- if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 1)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_WHITE, "{03A494}Foloseste:{FFFFFF} /getpcar (1,2,3)");
- return 1;
- }
- if(IsPlayerInAnyVehicle(playerid))
- {
- SendClientMessage(playerid,COLOR_WHITE,"Pentru a folosi comanda, trebuie sa iesi din masina!");
- return 1;
- }
- new car = PlayerInfo[playerid][pPcarkey];
- new car2 = PlayerInfo[playerid][pPcarkey2];
- new car3 = PlayerInfo[playerid][pPcarkey3];
- new Float:plocx,Float:plocy,Float:plocz;
- new pcar = strval(tmp);
- if (pcar == 1)
- {
- if(car != 999)
- {
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- GetPlayerPos(playerid, plocx, plocy, plocz);
- SetVehiclePos(car,plocx,plocy+4, plocz);
- }
- else { SendClientMessage(playerid, COLOR_RED, "Nu ai vehicul pe primul slot!"); }
- }
- else if (pcar == 2)
- {
- if(car2 != 999)
- {
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- GetPlayerPos(playerid, plocx, plocy, plocz);
- SetVehiclePos(car2,plocx,plocy+4, plocz);
- }
- else { SendClientMessage(playerid, COLOR_RED, "Nu ai vehicul pe al doilea slot!"); }
- }
- else if (pcar == 3)
- {
- if(car3 != 999)
- {
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- GetPlayerPos(playerid, plocx, plocy, plocz);
- SetVehiclePos(car3,plocx,plocy+4, plocz);
- }
- else { SendClientMessage(playerid, COLOR_RED, "Nu ai vehicul pe al treilea slot!"); }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement