SA-MP Forums Archive
Spawn help - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Spawn help (/showthread.php?tid=125796)



Spawn help - (Jeff) - 05.02.2010

public OnPlayerRequestClass(playerid, classid)
{
SetupPlayerForClassSelection(playerid);
if(classid == 0) {
GameTextForPlayer(playerid,"CJ",300,6);
} else if(classid == 271) {
GameTextForPlayer(playerid,"Ryder",300,6);
} else if(classid == 121) {
GameTextForPlayer(playerid,"Citizen",300,6);
} else if(classid == 120) {
GameTextForPlayer(playerid,"Chinese",300,6);
} else if(classid == 16) {
GameTextForPlayer(playerid,"Airport Staff",300,6);
}

return 1;
}
public SetupPlayerForClassSelection(playerid)
{
SetPlayerPos(playerid, 1626.7664,-2290.1321,94.1270);
SetPlayerCameraPos(playerid, 1625.5867,-2288.2046,94.132;
SetPlayerCameraLookAt(playerid, 1626.7664,-2290.1321,94.1270);
}

Can only see the gametext for cj, the rest dont show :S


Re: Spawn help - jasonnw666 - 05.02.2010

try
public OnPlayerRequestClass(playerid, classid)
{
new string[128];
} else if(classid == 120) {
format(string, sizeof(string), "~y~> ~p~Chinese~y~< ~n~team!");
GameTextForPlayer(playerid,string,3500,6);
} else if(classid == 16) {
format(string, sizeof(string), "~y~> ~p~Airport Staff~y~< ~n~team!");
GameTextForPlayer(playerid,string,3500,6);
}

return 1;
}

and let me know if that work


Re: Spawn help - MadeMan - 05.02.2010

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetupPlayerForClassSelection(playerid);
    if(classid == 0) {
        GameTextForPlayer(playerid,"CJ",300,6);
    } else if(classid == 1) {
        GameTextForPlayer(playerid,"Ryder",300,6);
    } else if(classid == 2) {
        GameTextForPlayer(playerid,"Citizen",300,6);
    } else if(classid == 3) {
        GameTextForPlayer(playerid,"Chinese",300,6);
    } else if(classid == 4) {
        GameTextForPlayer(playerid,"Airport Staff",300,6);
    }
   
    return 1;
}
This is classid not skinid.