05.08.2010, 23:55
O /veh que eu tenho nao sai com /rc
Eu queria um que saisse
Alguem me ajuda ?
O codigo :
obrigado desde ja xD
Eu queria um que saisse
Alguem me ajuda ?
O codigo :
pawn Code:
if(strcmp(cmd, "/veh", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] < 2000)
{
SendClientMessage(playerid, COLOR_GRAD1, " Voce nгo esta autorizado a usar este comando!");
return 1;
}
if(admtrampando[playerid] < 1)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/administrar)");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /veh [carid] [COLOR1] [COLOR2]");
return 1;
}
new car;
car = strval(tmp);
if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_GREY, " Vehicle Number can't be below 400 ou above 611 !"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /veh [carid] [COLOR1] [COLOR2]");
return 1;
}
new COLOR1;
COLOR1 = strval(tmp);
if(COLOR1 < 0 || COLOR1 > 126) { SendClientMessage(playerid, COLOR_GREY, " COLOR Number can't be below 0 ou above 126 !"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /veh [carid] [COLOR1] [COLOR2]");
return 1;
}
new COLOR2;
COLOR2 = strval(tmp);
if(COLOR2 < 0 || COLOR2 > 126) { SendClientMessage(playerid, COLOR_GREY, " COLOR Number can't be below 0 ou above 126 !"); return 1; }
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
new carid = CreateVehicle(car, X,Y,Z, 0.0, COLOR1, COLOR2, 60000);
CreatedCars[CreatedCar] = carid;
CreatedCar ++;
format(string, sizeof(string), " Veiculo %d Criado.", carid);
SendClientMessage(playerid, COLOR_GREY, string);
}
return 1;
}