Quote:
Originally Posted by MarvinPWN
PHP код:
if(strcmp("/vehcolor",cmd,true) == 0)
{
new color[2],currentveh,string[145];
color[0] = strtok(cmdtext,idx);
color[1] = strtok(cmdtext,idx);
currentveh = GetPlayerVehicleID(playerid);
if(!IsPlayerInAnyVehicle(playerid))return SendClientMessage(playerid,COLOR_RED,"You must be in a vehicle to do this action!");
if(0 > color[0] > 255)return SendClientMessage(playerid,COLOR_RED,"Invalid Color ID");
if(0 > color[1] > 255)return SendClientMessage(playerid,COLOR_RED,"Invalid Color ID");
ChangeVehicleColor(currentveh,color[0],color[1]);
format(string,sizeof string,"Your car color have been changed to (ID: %d) and (ID: %d)",color[0],color[1]);
SendClientMessage(playerid,COLOR_GREEN,string);
return 1;
}
Take this. It should work. ![Wink](images/smilies/wink.png)
|
I get this
Код:
C:\Users\Damman\Desktop\SA-MP Test\gamemodes\edrift2.pwn(24783) : error 006: must be assigned to an array
C:\Users\Damman\Desktop\SA-MP Test\gamemodes\edrift2.pwn(24784) : error 006: must be assigned to an array
C:\Users\Damman\Desktop\SA-MP Test\gamemodes\edrift2.pwn(31188) : error 025: function heading differs from prototype
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.