Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/setplate", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pAdmin] >= 5)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_LIGHTGREEN, "{FFFFFF}[{F81414}wZone RPG{FFFFFF}]: /setplate [carid] [plate]");
- return 1;
- }
- new hid = strval(tmp);
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[256];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_WHITE, "{FFFFFF}[{F81414}wZone RPG{FFFFFF}]: /setplate [carid] [plate]");
- }
- strmid(CarInfo[hid][cNum], result, 0, 64, 255);
- SetVehicleNumberPlate(hid,result);
- SetVehicleToRespawn(hid);
- format(string, sizeof(string), "Placuta masinii %d setata la %s",hid,(result));
- SendClientMessage(playerid, COLOR_WHITE, string);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement