14.02.2013, 11:06
Hey,im trying to make a repair command with a timer:
This is my timer.
And this is the command:
Compiling error:
If i change repairtimer() to repairtimer(playerid), people reported that if one man uses the command,another one gets the answer. Please help
This is my timer.
pawn Код:
forward repairTimer();
public repairTimer()
{
SendClientMessage(playerid,0xFBFB00FF,"Masina sutvarkyta");
TogglePlayerControllable(playerid,1);
RepairVehicle(GetPlayerVehicleID(playerid));
return 1;
}
pawn Код:
CMD:repair(playerid,params[])
{
LoadStats(playerid);
if(PlayerInfo[playerid][Mechanic] == 1)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo[playerid][money]>500)
{
TogglePlayerControllable(playerid,0);
GivePlayerMoney(playerid,-500);
SetTimer("repairTimer",60000,false);
}
else return SendClientMessage(playerid,0xFBFB00FF,"Neuztenka pinigu.Kaina:500");
}
else return SendClientMessage(playerid,0xFBFB00FF,"Tu turi buti masinoje");
}
if(PlayerInfo[playerid][Mechanic]==0) return SendClientMessage(playerid,0xFBFB00FF,"Tu ne mechanikas");
return 1;
}
pawn Код:
C:\Users\Justas\Desktop\testserver 0.3x\gamemodes\rp.pwn(440) : error 017: undefined symbol "playerid"
C:\Users\Justas\Desktop\testserver 0.3x\gamemodes\rp.pwn(441) : error 017: undefined symbol "playerid"
C:\Users\Justas\Desktop\testserver 0.3x\gamemodes\rp.pwn(442) : error 017: undefined symbol "playerid"