Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/cc", true)== 0)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[64];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- new vid = GetPlayerVehicleID(playerid);
- if(strval(result) && strval(result[2]) >126 || strval(result) && strval(result[2]) <0) return SendClientMessage(playerid, COLOR_RED, "Invalid color id!");
- ChangeVehicleColor(vid, strval(result), strval(result[2]));
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "You are not in a vehicle!");
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment