Please Read up ,I make it but it for the Player who was in server,I want that it will work for the guys who just join the server..i want new guys all spawn at that place event place ..
my code is working fine..but i want that the guys who just join the server if the event is going on they also spawn there...
Код:
//UnderOnPlayerSpawn
if(pInfo[playerid][CES]==1 && pInfo[playerid][pSpawn]==1)
{
SetPlayerPos(playerid,GetPVarFloat(playerid,"XX"),GetPVarFloat(playerid,"XY"),GetPVarFloat(playerid,"XZ"));
}
CMD:setspawnteam1(playerid,params[]) // when i use this it will set the spawn team C1
{
if(pInfo[playerid][pLevel] >= 3 )
{
new Float:P[3];
GetPlayerPos(playerid,P[0],P[1],P[2]);
SetPVarFloat(playerid,"XX",P[0]);
SetPVarFloat(playerid,"XY",P[1]);
SetPVarFloat(playerid,"XZ",P[2]);
for(new i=0; i < MAX_PLAYERS; i++)
{
if(gTeam[i] == C1)
{
SetPVarFloat(i,"XX",P[0]);
SetPVarFloat(i,"XY",P[1]);
SetPVarFloat(i,"XZ",P[2]);
pInfo[i][CES]=1;
}
}
}else return SCM(playerid, COLOR_KRED, "You need to be admin to use this cmd!");return 1;
}
CMD:oneventspawn(playerid,params[]) // when i use this it will turn on there event spawn .
{
if(pInfo[playerid][pLevel] >= 3 )
{
for(new i=0; i < MAX_PLAYERS; i++)
{
pInfo[i][pSpawn]=1;
}
}else return SCM(playerid, COLOR_KRED, "You need to be admin to use this cmd!");return 1;
}
this will work only for the players who have pInfo[playerid][pSpawn]=1; and pInfo[playerid][CES]=1;
I'm saying if the event is going on some budy join he have pInfo[playerid][pSpawn]=0; and pInfo[playerid][CES]=0;
he can't enter that event , I want if event is going on some budy join server he will spawn at event place..