22.04.2013, 00:24
I hit the 'new' button to start a new script, I have set up the spawning and everything but for some reason, when I spawn, I spawn with a CJ skin, and I am flew into the air, why does this happen?
public OnGameModeInit() { AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); return 1; }
public OnPlayerSpawn(playerid)
{
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
SetPlayerPos(playerid,1742.8767,-1863.5521,13.5749);
if(gPlayerLogged[playerid])
{
SetPlayerSpawn(playerid);
SetPlayerHealth(playerid,100);
}
return 1;
}
forward SetPlayerSpawn(playerid);
public SetPlayerSpawn(playerid)
{
if(PlayerInfo[playerid][pSpawnPoint] == 0)
{
Wounded[playerid] = 0;
SetPlayerPos(playerid,1742.8767,-1863.5521,13.5749);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
SetPlayerFacingAngle(playerid,0);
SetPlayerHealth(playerid,100);
gPlayerLogged[playerid] = 1;
}
if(PlayerInfo[playerid][pAdmin] > 0)
{
new string2[64];
format(string2, sizeof(string2), "SERVER: You are logged in as a level %d admin",PlayerInfo[playerid][pAdmin]);
SendClientMessage(playerid, COLOR_WHITE, string2);
}
}
return 1;
}