dcmd_spraycar(playerid, params[])
{
if(GetPlayerState(playerid) != 2) return SendClientMessage(playerid, 0xFF0000FF, "You are not driving in a vehicle.");
new clr,clr2;
if(sscanf(params, "iI(-1)", clr, clr2))
{
return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /spraycar [color1] <color2>");
}
if(clr2 == -1) clr2 = clr;
new szSuccess[44];
format(szSuccess, sizeof(szSuccess), "Vehicle colors changed to: {FFFFFF}%i and %i.", clr, clr2);
SendClientMessage(playerid, 0x00FF00FF, szSuccess);
ChangeVehicleColor(GetPlayerVehicleID(playerid), clr, clr2);
return 1;
}
new colour1, colour2;
if(!strlen(tmp2)) colour1 = random(126);
else colour1 = strval(tmp2);
if(!strlen(tmp3)) colour2 = random(126);
else colour2 = strval(tmp3);
ChangeVehicleColor(GetPlayerVehicleID(playerid), colour1, colour2);
pawn Код:
|
dcmd_spraycar(playerid, params[])
{
if(GetPlayerState(playerid) != 2) return SendClientMessage(playerid, 0xFF0000FF, "You are not driving in a vehicle.");
new clr,clr2;
if(sscanf(params, "iI(-1)", clr, clr2))
{
return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /spraycar [color1] <color2>");
}
new colour1, colour2;
if(!strlen(tmp2)) colour1 = random(126);
else colour1 = strval(tmp2);
if(!strlen(tmp3)) colour2 = random(126);
else colour2 = strval(tmp3);
ChangeVehicleColor(GetPlayerVehicleID(playerid), colour1, colour2);
return 1;
}
C:\Users\r530\Desktop\C&R\gamemodes\SFCRRPG.pwn(3305) : error 017: undefined symbol "dcmd_spraycar" *****(3309) : error 017: undefined symbol "params" *****(3314) : error 017: undefined symbol "tmp2" *****(3315) : error 017: undefined symbol "tmp2" *****(3316) : error 017: undefined symbol "tmp3" *****(3317) : error 017: undefined symbol "tmp3" *****(3308) : warning 203: symbol is never used: "clr2" *****(3308) : warning 203: symbol is never used: "clr" *****(3308 -- 3323) : warning 225: unreachable code Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 6 Errors.
dcmd_spraycar(playerid, params[])
{
if(GetPlayerState(playerid) != 2) return SendClientMessage(playerid, 0xFF0000FF, "You are not driving in a vehicle.");
new colour1,colour2;
new tmp2[256]; tmp2 = strtok(params,Index);
new tmp3[256]; tmp3 = strtok(params,Index);
if(sscanf(params, "iI(-1)", colour1, colour2))
{
return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /spraycar [color1] <color2>");
}
new colour1, colour2;
if(!strlen(tmp2)) colour1 = random(126);
else colour1 = strval(tmp2);
if(!strlen(tmp3)) colour2 = random(126);
else colour2 = strval(tmp3);
ChangeVehicleColor(GetPlayerVehicleID(playerid), colour1, colour2);
return 1;
}
dcmd(spraycar,9,cmdtext);