PDA

View Full Version : not working


sscarface
26/02/2013, 06:33 AM
public OnPlayerText(playerid, text[])
{
new string[250];

if(GetTeam[playerid] == CLASS_COPS || GetTeam[playerid] == CLASS_CIA || GetTeam[playerid] == CLASS_FBI || GetTeam[playerid] == CLASS_ARMY)
if(strval(text) == 1 && IsPlayerInDynamicCP(playerid, coprefill))
{
SetPlayerHealth(playerid, 100.0);
SendClientMessage(playerid, LIGHTGREEN, "Your health has been refilled!");
return 0;
}
if(GetTeam[playerid] == CLASS_COPS || GetTeam[playerid] == CLASS_CIA || GetTeam[playerid] == CLASS_FBI || GetTeam[playerid] == CLASS_ARMY)
if(strval(text) == 1 && IsPlayerInDynamicCP(playerid, coprefill))
{
SetPlayerArmour(playerid, 100.0);
SendClientMessage(playerid, LIGHTGREEN, "Your health has been refilled!");
return 0;
}
if(GetTeam[playerid] == CLASS_COPS || GetTeam[playerid] == CLASS_CIA || GetTeam[playerid] == CLASS_FBI || GetTeam[playerid] == CLASS_ARMY)
if(strval(text) == 3 && IsPlayerInDynamicCP(playerid, coprefill))
{
GivePlayerWeapon(playerid, 22, 2500);
GivePlayerWeapon(playerid, 25, 2500);
GivePlayerWeapon(playerid, 32, 2500);
SendClientMessage(playerid, LIGHTGREEN, "Your weapons has been refilled!");
return 0;
}

they don't working for cops too. what i did wrong? will u fixed it , thanks!

sscarface
26/02/2013, 06:58 AM
bump?

yusei
26/02/2013, 08:19 AM
Try

stock IsGouv(playerid)
{
if(GetTeam[playerid] == CLASS_COPS || GetTeam[playerid] == CLASS_CIA || GetTeam[playerid] == CLASS_FBI || GetTeam[playerid] == CLASS_ARMY)
return 1;
}

public OnPlayerText(playerid, text[])
{
new string[250];
if(IsGouv(playerid))
{

if(strval(text) == 1 && IsPlayerInDynamicCP(playerid, coprefill))
{
SetPlayerHealth(playerid, 100.0);
SendClientMessage(playerid, LIGHTGREEN, "Your health has been refilled!");
return 0;
}

if(strval(text) == 1 && IsPlayerInDynamicCP(playerid, coprefill))
{
SetPlayerArmour(playerid, 100.0);
SendClientMessage(playerid, LIGHTGREEN, "Your health has been refilled!");
return 0;
}

if(strval(text) == 3 && IsPlayerInDynamicCP(playerid, coprefill))
{
GivePlayerWeapon(playerid, 22, 2500);
GivePlayerWeapon(playerid, 25, 2500);
GivePlayerWeapon(playerid, 32, 2500);
SendClientMessage(playerid, LIGHTGREEN, "Your weapons has been refilled!");
return 0;
}
}
}

sscarface
26/02/2013, 11:25 AM
not working when i type 1 or 2 or 3 in checkpoint i don't get anything. i means what i script.