Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(!strcmp(ComandoBefore, "/ecarro", true))
- {
- if(IsPlayerAdmin(playerid))
- {
- new id, pname[MAX_PLAYER_NAME], tmp[256];
- tmp = StringSplit(cmdtext, PosDelimitador);
- if(!strlen(tmp) || !IsNumeric(tmp))
- {
- SendClientMessage(playerid, Laranja, "Use: /ecarro [carro id]");
- return 1;
- }
- id = strval(tmp);
- if(id < 400 || id > 607)
- {
- SendClientMessage(playerid, 0xFF0000AA, "[ERRO] Este veiculo invlido!");
- return 1;
- }
- for(new i; i < MAX_PLAYERS; ++i)
- {
- if(IsPlayerInEvent[i])
- {
- GetPlayerPos(i, x, y, z);
- GetPlayerFacingAngle(i, a);
- PutPlayerInVehicle(i, CreateVehicle(id, x, y, z, a, -1, -1, 2000), 0);
- }
- }
- GetPlayerName(playerid, pname, sizeof pname);
- format(string, sizeof string, "O Administrador %s deu para todos do evento o carro %s.",
- pname, NomesVeiculos[id-400]);
- MessageToAdmins(Evento,string);
- } else {
- SendClientMessage(playerid, 0xFF0000AA, "[ERRO] Voc no admin!");
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement