27.02.2013, 08:47
PHP код:
foreach(Player, i)
{
if(GetTeam{i} == CLASS_COPS || GetTeam{i} == CLASS_CIA || GetTeam{i} == CLASS_FBI || GetTeam{i} == CLASS_ARMY)
{
if(strval(text) == 1 && IsPlayerInDynamicCP(playerid, coprefill))
{
SetPlayerHealth(playerid, 100.0);
SendClientMessage(playerid, LIGHTGREEN, "Your health has been refilled!");
return 0;
}
if(strval(text) == 2 && IsPlayerInDynamicCP(playerid, coprefill))
{
SetPlayerArmour(playerid, 100.0);
SendClientMessage(playerid, LIGHTGREEN, "Your armour 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;
}
if(strval(text) == 4 && IsPlayerInDynamicCP(playerid, coprefill))
{
HideMenu(playerid);
format(string, sizeof(string), "~n~~p~Spawn Vehicle~n~~n~~y~1. ~w~Patrol Car~n~~y~2. ~w~Armour~n~~y~3. ~w~Weapons~n~~y~4. ~w~Vehicle");
TextDrawSetString(COPREFILL1, string);
TextDrawShowForPlayer(playerid, copref);
TextDrawShowForPlayer(playerid, COPREFILL1);
return 1;
}
}
}
this choose 1 car but i want make when they do 1 so they gave a car to cop. how to m make i dnt think u understand me but if u dnt so pls tell me i will explain u more but i ry need help. pls