Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //no topo:
- forward Posicao();
- new bool:inpoint[MAX_PLAYERS];
- //no OnGameModeInit:
- SetTimer("Posicao", 1000, 1);
- //no começo OnPlayerText:
- if(inpoint[playerid])
- {
- new tmp[256], index, cor1, cor2;
- tmp = strtok(text, index);
- cor1 = strval(tmp);
- tmp = strtok(text, index);
- cor2 = strval(tmp);
- if(!strlen(tmp))
- return SendClientMessage(playerid, 0xFF0000AA, "Uso: [cor1] [cor2]");
- if(!IsPlayerInAnyVehicle(playerid))
- return SendClientMessage(playerid, 0xFF0000AA, "Você não está em um veículo!");
- ChangeVehicleColor(GetPlayerVehicleID(playerid), cor1, cor2);
- return 0;
- }
- //no final do script:
- public Posicao()
- {
- for(new i = 0; i < MAX_PLAYERS; ++i)
- {
- if(PlayerToPoint(10.0, i, x, y, z))
- {
- if(!inpoint[i])
- SendClientMessage(i, 0xFFF000AA, "Digite a cor que deseja (Uso: [cor1] [cor2])");
- inpoint[i] = true;
- } else {
- inpoint[i] = false;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement