11.02.2010, 18:04
Having issues making my /forthelulz command return /ftl. Here's the code:
But it tells me that line 177 is an invalid expression and assumed zero THREE TIMES (WTF?)
I tried making the zcmds COMMAND:ftl and such, but that told me ftl was never used, along with any of my timer functions.
I also know theres lots else wrong with that code, so if someone could help me fix it up, it would go greatly appreciated
pawn Код:
zcmd(forthelulz,playerid,params[])
{
return zcmd(ftl,playerid,params[]); //line 177
}
zcmd(ftl,playerid,params[])
{
if(HasPlayerLulzed[MAX_PLAYERS] == 0)
{
SetPlayerDrunkLevel(playerid,50000);
new Float:X, Float:Y, Float:Z;
GetPlayerVelocity(playerid,X,Y,Z);
SetPlayerVelocity(playerid,X*1.5,Y*1.5,(Z+1)*1.5);
SetTimer(public stoplulz,30000,false);
new name[MAX_PLAYER_NAME];
new string[64];
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"*****%s is lulzing, watch out!",name);
SendClientMessageToAll(yellow,string);
HasPlayerLulzed[MAX_PLAYERS] += 1;
SetTimer(public SetHasPlayerLulzed,60000,false);
}
else SendClientMessage(playerid,red,"You can only lulz once every minute!");
return 1;
}
public stoplulz(playerid)
{
SetPlayerDrunkLevel(playerid, 0)
SendClientMessage(playerid,lightred,"You stopped lulzing.");
}
public SetHasPlayerLulzed(playerid)
{
HasPlayerLulzed[MAX_PLAYERS] == 1;
return 1;
}
I tried making the zcmds COMMAND:ftl and such, but that told me ftl was never used, along with any of my timer functions.
I also know theres lots else wrong with that code, so if someone could help me fix it up, it would go greatly appreciated