need help with code -
n3r0s - 12.04.2010
i dont get the code to work and i hadnt done anyting wrong.
here is the code
if(strcmp(cmd, "/500mats", true) == 0)
{
GivePlayerMaterials(playerid, 500));
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(playerid, sendername, sizeof(sendername));
SendClientMessage(playerid, COLOR_RED "(Sendername)) you got GivePlayerMaterials materials!"));
SendClientMessage(ToALL));
return 1;
}
return 1;
Re: need help with code -
n3r0s - 12.04.2010
can someon help me plz.
Re: need help with code -
aircombat - 12.04.2010
Код:
if(strcmp(cmd, "/500mats", true) == 0)
{
GivePlayerMaterials(playerid, 500));
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(playerid, sendername, sizeof(sendername));
SendClientMessage(playerid, COLOR_RED "(Sendername)) you got GivePlayerMaterials materials!");
SendClientMessage(ToALL));
return 1;
}
Re: need help with code -
n3r0s - 12.04.2010
is that right now?
Re: need help with code -
Adil - 12.04.2010
Show me the errors.
Re: need help with code -
n3r0s - 12.04.2010
(92) : error 017: undefined symbol "cmd"
(94) : error 017: undefined symbol "GivePlayerMaterials"
(94) : error 029: invalid expression, assumed zero
(94) : warning 215: expression has no effect
(95) : error 017: undefined symbol "sendername"
(95) : error 017: undefined symbol "sendername"
(95) : error 029: invalid expression, assumed zero
(95) : fatal error 107: too many error messages on one line
Re: need help with code -
Adil - 12.04.2010
First of all put this on the top of your script, below the #define's.
pawn Код:
new PlayerMaterials[MAX_PLAYERS];
then change your old command to this one:
pawn Код:
if(strcmp(cmd, "/500mats", true) == 0)
{
PlayerMaterials = 500;
SendClientMessage(playerid, COLOR_RED, "You got 500 Materials");
return 1;
}
return 1;
Why did you privided so useless information in your script ? you didn't even used GetPlayerName.
Re: need help with code -
¤Adas¤ - 12.04.2010
We will NEVER know what to do with the code, if you don't explain, what you are trying to do. Show us your functions and/or used variables. Remember this.