I am unable to use KEY_WALK for a team but for other team it works. - 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: I am unable to use KEY_WALK for a team but for other team it works. (
/showthread.php?tid=510256)
I am unable to use KEY_WALK for a team but for other team it works. -
Gaurav_Rawat - 30.04.2014
Yeah it sounds strange,Suddenly KEY_WALK function has stopped working for Team A,but it works fine for TEAM B.
And its problem with KEY_WALK only,If i change KEY_WALK to other keys it works for Team A too can you tell me reason ?
One of Team A Code.
pawn Код:
if(PRESSED(KEY_WALK))
{
if(team[playerid] == TEAM_A)
{
if(pInfo[playerid][pClass] == FROZER)
{
if(gettime() - 13 < Abilitys[playerid][FrozenMakerAb]) return GameTextForPlayer(playerid,"~w~ Still Time left",1000,5);
{
foreach(Player,i)
{
switch(GetPlayerSkin(i))
{
case newbies://I have defined numbers(skin ids) of team B that can be frozen)
{
if(GetDistanceBetweenPlayers(playerid,i) < 7.0)
{
GetClosestPlayer(i);
TogglePlayerControllable(i, 0);
SetTimerEx("ClearF",1800,0,"i",i);
}
}
}
}
}
}
}
}
Re: I am unable to use KEY_WALK for a team but for other team it works. -
BigBrainAFK - 30.04.2014
So a little side note: you should read
this
Re: I am unable to use KEY_WALK for a team but for other team it works. -
Gaurav_Rawat - 30.04.2014
Well i will fix the indention if you have solution to my problem please post it
Re: I am unable to use KEY_WALK for a team but for other team it works. -
BigBrainAFK - 30.04.2014
why is there a
in a switch that will give skinids
Re: I am unable to use KEY_WALK for a team but for other team it works. -
Gaurav_Rawat - 30.04.2014
@Big
Quote:
case newbies://I have defined numbers(skin ids) of team B that can be frozen)
|
I have defined newbies at top of the script with skin ids of team B