24.08.2009, 07:52
Hi!
i just made automativ gates but then i wanted taht only one Team can use it.
(if(gTeam[playerid] == TEAM_NWC))
i have to put it in the gamemode. First there were warnings:
same with "y" and "z".
So i wrote:
when i started the game i ran to the doors but they didnt open!
and where i have to put the (if(gTeam[playerid] == TEAM_NWC))??
help!
i just made automativ gates but then i wanted taht only one Team can use it.
(if(gTeam[playerid] == TEAM_NWC))
i have to put it in the gamemode. First there were warnings:
Код:
Warning) local variable "x" shadows a variable at a preceding level
So i wrote:
Код:
forward PlayerToPoint(Float:radi, playerid, Float:x111, Float:y111, Float:z111); public PlayerToPoint(Float:radi, playerid, Float:x111, Float:y111, Float:z111) { if(IsPlayerConnected(playerid)) { new Float:oldposx111, Float:oldposy111, Float:oldposz111; new Float:tempposx111, Float:tempposy111, Float:tempposz111; GetPlayerPos(playerid, oldposx111, oldposy111, oldposz111); tempposx111 = (oldposx111 -x) tempposy111 = (oldposy111 -y); tempposz111 = (oldposz111 -z); //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz); if (((tempposx111 < radi) && (tempposx111 > -radi)) && ((tempposy111 < radi) && (tempposy111 > -radi)) && ((tempposz111 < radi) && (tempposz111 > -radi))) { return 1; } } return 0; }
and where i have to put the (if(gTeam[playerid] == TEAM_NWC))??
help!