Help plis
#1

I want to make in script different teams for example:

If the player choosed skin id 285 will spawn at LSPD and if he choose skin id 290 he will spawn at Grove Street
Reply
#2

https://sampwiki.blast.hk/wiki/AddPlayerClass
Reply
#3

try this
Under onplayerspawn
pawn Code:
if(GetPlayerSkin(playerid) == 285) return SetPlayerPos(playerid,LSPDX,LSPDY,LSPDZ);
if(GetPlayerSkin(playerid) == 290) return SetPlayerPos(playerid,GROVEX,GROVEY,GROVEZ);
Reply
#4

Why return? Then the rest of OnPlayerSpawn isn't going to be executed.

Create an array.

pawn Code:
new Float:sSpawn[][4] = {
{x, y, z, angle}, // Skin ID 0
{x, y, z, angle}, // Skin ID 1
{x, y, z, angle}, // Skin ID 2
// etc.
};
under OnPlayerSpawn:

pawn Code:
new skin = GetPlayerSkin(playerid);
SetPlayerPos(playerid, sSpawn[skin][0], sSpawn[skin][1], sSpawn[skin][2]);
SetPlayerFacingAngle(playerid, sSpawn[skin][3]);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)