#include <a_samp>
#include <gl_common>
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define FILTERSCRIPT
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[128], idx;
cmd = strtok(cmdtext, idx);
if (strcmp("/carcolor", cmd, true) == 0)
{
new Color1[128];
new Color2[128];
new currentveh;
Color1 = strtok(cmdtext, idx);
Color2 = strrest(cmdtext, idx);
currentveh = GetPlayerVehicleID(playerid);
if (strval(Color1) > 255)
{
SendClientMessage(playerid, COLOR_RED, "Invalid Color ID 1");
return 1;
}
if (strval(Color2) > 255)
{
SendClientMessage(playerid, COLOR_RED, "Invalid Color ID 2");
return 1;
}
else
{
ChangeVehicleColor(currentveh, strval(Color1), strval(Color2));
return 1;
}
}
return 0;
}
{
if(PlayerAtPos(15.0, playerid, 2382.0005,231.7945,26.6032))
{
else
{
SendClientMessage(playerid, COLOR_RED, "You are not at the service garage!");
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[128], idx;
cmd = strtok(cmdtext, idx);
if (strcmp("/carcolor", cmd, true) == 0)
{
if(PlayerAtPos(15.0, playerid, 2382.0005,231.7945,26.6032))
{
new Color1[128];
new Color2[128];
new currentveh;
Color1 = strtok(cmdtext, idx);
Color2 = strrest(cmdtext, idx);
currentveh = GetPlayerVehicleID(playerid);
if (strval(Color1) > 255)
{
SendClientMessage(playerid, COLOR_RED, "Invalid Color ID 1");
return 1;
}
if (strval(Color2) > 255)
{
SendClientMessage(playerid, COLOR_RED, "Invalid Color ID 2");
return 1;
}
else
{
ChangeVehicleColor(currentveh, strval(Color1), strval(Color2));
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "You are not at the service garage!");
return 1;
}
}
return 0;
}
|
Originally Posted by MadeMan
pawn Код:
|
warning 206: redundant test: constant expression is non-zero
if(PlayerAtPos(15.0, playerid, 2382.0005,231.7945,26.6032))
if(PlayerAtPos(15.0, playerid, 2382.0005,231.7945,26.6032))
if(IsPlayerInRangeOfPoint(playerid, 15.0, 2382.0005,231.7945,26.6032))
|
Originally Posted by MadeMan
pawn Код:
pawn Код:
|