public OnPlayerSpawn(playerid)
{
SetTimer(toilet, 3600000, true);
return 1;
}
forward toilet(playerid);
public toilet(playerid)
{
SendClientMessage(playerid, COLOR_RED, "Your blather is full, you need to go to the toilet quick!((You got 5 minutes))");
SetTimer(Hastogo, 300000, false);
}
forward Hastogo(playerid);
public Hastogo(playerid)
{
SendClientMessage(playerid, COLOR_RED, "You could not hold it in anylonger! You've started to urinate!");
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_RED, "Quick, get out! You dont want to pee all over de car seat dont you?");
}
else
{
SetPlayerSpecialAction(playerid, 68);
}
return 1;
}
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\RcRP.pwn(2454) : error 076: syntax error in the expression, or invalid function call C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\RcRP.pwn(1371) : error 076: syntax error in the expression, or invalid function call
SetTimer(toilet, 3600000, true);
SetTimer(Hastogo, 300000, false);
public OnPlayerSpawn(playerid)
{
SetTimer("toilet", 3600000, true);
return 1;
}
forward toilet(playerid);
public toilet(playerid)
{
SendClientMessage(playerid, COLOR_RED, "Your blather is full, you need to go to the toilet quick!((You got 5 minutes))");
SetTimer("Hastogo", 300000, false);
}
forward Hastogo(playerid);
public Hastogo(playerid)
{
SendClientMessage(playerid, COLOR_RED, "You could not hold it in anylonger! You've started to urinate!");
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_RED, "Quick, get out! You dont want to pee all over de car seat dont you?");
}
else
{
SetPlayerSpecialAction(playerid, 68);
}
return 1;
}
Omg thanks for your quick help!
Now i also understandt timers PS: Could you help me with one more thingy?: When someone is in a car and it gives that message it should also happend that when he gets out, a timer starts of 3 seconds and that after that the peeing action goes on. |
new Toilet[MAX_PLAYERS];
public OnPlayerExitVehicle(playerid, vehicleid)
{ if(Toilet[playerid] == 1)
{
//do whatyouwant
}
return 1;
}
Toilet[playerid] = 1;
forward Hastogo(playerid);
public Hastogo(playerid)
{
SendClientMessage(playerid, COLOR_RED, "You could not hold it in anylonger! You've started to urinate!");
if(IsPlayerInAnyVehicle(playerid))
{ Toilet[playerid] = 1;
SendClientMessage(playerid, COLOR_RED, "Quick, get out! You dont want to pee all over de car seat dont you?");
}
else
{
SetPlayerSpecialAction(playerid, 68);
}
return 1;
}