24.12.2011, 03:04
Alright, So i got a wierd way of spawning my players with weapons and such.
It goes from : Select team > Select Class > Select Skin > spawn.
But it wont spawn the class's guns, Nor the right location.
Code:
OnPlayerSpawn
And one of the class's function.
I May be missing something? or Am i doing something incorrectly?
-Dakota
It goes from : Select team > Select Class > Select Skin > spawn.
But it wont spawn the class's guns, Nor the right location.
Code:
OnPlayerSpawn
pawn Код:
public OnPlayerSpawn(playerid)
{
new Team = GetPlayerTeam(playerid);
new Skin = GetPlayerSkin(playerid);
TextDrawShowForPlayer(playerid, countdown);
TextDrawShowForPlayer(playerid, timeleft);
TextDrawShowForPlayer(playerid, website);
SetPlayerInterior(playerid, 0);
if(pSoldier[playerid] == 1) return SetSpawnInfo(playerid, Team, Skin, -1689.67, -95.16, 3.57, 0.0, 22, 500, 25, 500, 30, 500);
else if(pMedic[playerid] == 1) return SetSpawnInfo(playerid, Team, Skin, -1689.67, -95.16, 3.57, 0.0, 22, 500, 25, 500, 30, 500);
else if(pSniper[playerid] == 1) return SetSpawnInfo(playerid, Team, Skin, -1689.67, -95.16, 3.57, 0.0, 22, 500, 25, 500, 30, 500);
return 1;
}
pawn Код:
public Soldier(playerid)
{
new classid;
pSoldier[playerid] = 1;
new Team = GetPlayerTeam(playerid);
new pname[MAX_PLAYER_NAME], cstring[60];
GetPlayerName(playerid, pname, sizeof(pname));
format(cstring, sizeof(cstring),"info: %s Became a soldier! (TEAM: %d)", pname, Team);
SendClientMessage(playerid, COLOR_TAN, cstring);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1);
OnPlayerRequestClass(playerid, classid);
return 1;
}
-Dakota