- เครดิต
- 254
- ความรู้
-
- เงิน $
-
- ความดี
-
|
คำสั่ง if(strcmp(cmd, "/cveh", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] <= 2)
{
SendClientMessage(playerid, COLOR_GRAD1, " ¤Ø³äÁèãªèʵêÒ¿·ÕèÊÒÁÒöãªé¤ÓÊÑ觹Õéä´é!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /cveh [color1] [color2]");
return 1;
}
new car;
car = strval(tmp);
if(car < 0 || car > 1000) { SendClientMessage(playerid, COLOR_GREY, " Color Number can't be below 0 or above 126 !"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /cveh [color1] [color2]");
return 1;
}
new color1;
color1 = strval(tmp);
if(color1 < 0 || color1 > 500) { SendClientMessage(playerid, COLOR_GREY, " Color Number can't be below 0 or above 500 !"); return 1; }
new vehicleid = GetPlayerVehicleID(playerid);
ChangeVehicleColor(vehicleid, car, color1);
SendClientMessage(playerid, COLOR_GREY, "* öà»ÅÕè¹ÊÕáÅéÇ");
}
return 1;
}
จบละ
|
|