Small command error.
#1

Ok so I made this command, that allows to player to accept his death after dying but seems like it doesn't work.
here is the command : how can I solve it ?
PHP код:
new pdeath[MAX_PLAYERS]; 
PHP код:
public OnPlayerSpawn(playerid)
{
 
SetPlayerColor(playerid0xFFFFFFAA);
SetPlayerMoney(playerid5000);
if(
pdeath == 1)
{
TogglePlayerControllable(playerid0);
SetPlayerPos(playerid,1583.4307,-1634.7228,13.3905);
SendClientMessage(playerid0xFF4646FF"/acceptdeath"); 
}
TogglePlayerControllable(playerid1);
  return 
1;

PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
pdeath[playerid] = 1;
return 
1;

PHP код:
 if (strcmp(cmdtext"/acceptdeath"true) == 0)
    {
 if(
pdeath == 0) return SendClientMessage(playerid0xFF4646FF"blablabla");
GivePlayerMoney(playerid, -500);
pdeath 0;
    return 
1;

PHP код:
warnings :
C:\Documents and Settings\\My Documents\Downloads\samp03bsvr_R2_win32\gamemodes\RP.pwn(294) : error 033: array must be indexed (variable "pdeath")
C:\Documents and Settings\\My Documents\Downloads\samp03bsvr_R2_win32\gamemodes\RP.pwn(528) : error 033: array must be indexed (variable "pdeath")
C:\Documents and Settings\\My Documents\Downloads\samp03bsvr_R2_win32\gamemodes\RP.pwn(530) : error 033: array must be indexed (variable "pdeath")
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
3 Errors

Reply


Messages In This Thread
Small command error. - by Scriptissue - 29.09.2010, 09:20
Re: Small command error. - by Calgon - 29.09.2010, 09:29
Re: Small command error. - by Scriptissue - 29.09.2010, 10:26
Re: Small command error. - by [XST]O_x - 29.09.2010, 10:35
Re: Small command error. - by Scriptissue - 29.09.2010, 11:14
Re: Small command error. - by Scriptissue - 29.09.2010, 11:39
Re: Small command error. - by HyperZ - 29.09.2010, 11:50
Re: Small command error. - by Scriptissue - 29.09.2010, 12:36
Re: Small command error. - by rbN. - 29.09.2010, 12:40
Re: Small command error. - by Scriptissue - 29.09.2010, 12:50

Forum Jump:


Users browsing this thread: 1 Guest(s)