if (strcmp("/godc", cmdtext, true, 8 ) == 0)
{
if(GetPVarInt(playerid,"GodCar")==0)
{
SetVehicleHealth(playerid,1000000);
SetPVarInt(playerid,"GodCar",1);
SendClientMessage(playerid,COL_ADMIN,"God car on");
}
else
{
SetVehicleHealth(playerid,1000);
SetPVarInt(playerid,"GodCar",0);
SendClientMessage(playerid,COL_ADMIN,"God car off");
}
return 1;
}
//Global variable: new GodCar[MAX_PLAYERS]; //Command: if (strcmp("/godc", cmdtext, true, 8 ) == 0) { if(GetPVarInt(playerid,"GodCar")==0) { GodCar[playerid] = SetTimerEx("GodCar",500,true,"d",playerid); SetPVarInt(playerid,"GodCar",1); SendClientMessage(playerid,COL_ADMIN,"God car on"); } else { KillTimer(GodCar[playerid]); SetPVarInt(playerid,"GodCar",0); SendClientMessage(playerid,COL_ADMIN,"God car off"); } return 1; } //TIMER: forward GodCar(playerid); public GodCar(playerid) { if(IsPlayerInAnyVehicle(playerid)) { RepairVehicle(GetPlayerVehicleID(playerid)); } return 1; }
(282) : error 029: invalid expression, assumed zero
(282) : error 012: invalid function call, not a valid address
(282) : warning 215: expression has no effect
(282) : error 001: expected token: ";", but found ")"
(282) : fatal error 107: too many error messages on one line
forward GodCar(playerid);
new GodCar[MAX_PLAYERS];
RepairVehicle(GetPlayerVehicleID(playerid));
RepairVehicle(vehicleid);
still the same. Where should i add the timer under? i have it right under the /godc command but i dont believe thats right
|
forward GodCar(playerid);