Faction help please please. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Faction help please please. (
/showthread.php?tid=362368)
Faction help please please. -
TaLhA XIV - 24.07.2012
PHP код:
#define TEAM_ME 1
new PlayerInfo[MAX_PLAYERS][pInfo];
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/heal", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][TEAM_ME]);
{
new targetid;
SetPlayerHealth(targetid,100);
}
else
{
SendClientMessage(playerid,0xE00404,"You are not a medic");
}
return 1;
}
return 0;
}
these are my codes but they are giving erors please help.
Respuesta: Faction help please please. -
farCry.xD - 24.07.2012
Show me the errors .
Re: Faction help please please. -
TaLhA XIV - 24.07.2012
okay here are the errors
PHP код:
C:\Users\TaLhA XIV\Desktop\samp\filterscripts\factions.pwn(89) : error 017: undefined symbol "pInfo"
C:\Users\TaLhA XIV\Desktop\samp\filterscripts\factions.pwn(89) : error 009: invalid array size (negative, zero or out of bounds)
C:\Users\TaLhA XIV\Desktop\samp\filterscripts\factions.pwn(94) : error 017: undefined symbol "TEAM_ME"
C:\Users\TaLhA XIV\Desktop\samp\filterscripts\factions.pwn(94) : error 036: empty statement
C:\Users\TaLhA XIV\Desktop\samp\filterscripts\factions.pwn(99) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.
Re: Faction help please please. -
catalinutzu - 24.07.2012
va rog frumos ma puteti bbaga in factiune tataglia
Re: Faction help please please. -
Devilxz97 - 24.07.2012
https://sampwiki.blast.hk/wiki/GetPlayerTeam
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/heal", cmdtext, true, 10) == 0)
{
if(GetPlayerTeam(playerid) == TEAM_ME)
{
new targetid;
SetPlayerHealth(targetid,100);
}
else
{
SendClientMessage(playerid,0xE00404,"You are not a medic");
}
return 1;
}
return 0;
}
Re: Faction help please please. -
Devilxz97 - 24.07.2012
https://sampwiki.blast.hk/wiki/GetPlayerTeam
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/heal", cmdtext, true, 10) == 0)
{
if(GetPlayerTeam(playerid) == TEAM_ME)
{
new targetid;
SetPlayerHealth(targetid,100);
}
else
{
SendClientMessage(playerid,0xE00404,"You are not a medic");
}
return 1;
}
return 0;
}