RandomPlayerSpawn
#1

new Float:gCopPlayerSpawns[2][1] = {
{2297.1064,2452.0115,10.8203},
{2297.0452,2468.6743,10.8203}
};

How can i add skin with the position so that one position has different skin than the other??
Reply
#2

Well if u want u can change ur skin bu tup /kill and f4!
But this i dont know!
Reply
#3

no, i want the skin to be set with the position so if the position is different the skin will be different
Reply
#4

Using AddPlayerClassEx would be the easist way. You can still randomize the positions by team, if you want to, or just randomize it. Just put a random function with a switch-thing under OnPlayerSpawn.

Cheers.
Reply
#5

Quote:
Originally Posted by pawelf94
new Float:gCopPlayerSpawns[2][1] = {
{2297.1064,2452.0115,10.8203},
{2297.0452,2468.6743,10.8203}
};

How can i add skin with the position so that one position has different skin than the other??
pawn Код:
//first put this above gamemodeinit
new Float:gCopPlayerSpawns[][] = {
{2297.1064,2452.0115,10.8203},
{2297.0452,2468.6743,10.8203}
};
//put this under onplayerspawn
new grandom;
grandom = random(sizeof(gCopPlayerSpawns));
SetPlayerPos(playerid,gCopPlayerSpawns[grandom][0] ,gCopPlayerSpawns[grandom][1] ,gCopPlayerSpawns[grandom][2] );
Reply
#6

BUT I GOT THOSE SPAWNS

Код:
new Float:gHotelPlayerSpawns[30][1] = {
{2190.2075,-1141.6069,1029.7969},  //173.8527,0,0,0,0,0,0); // groove szef
{2220.7700,-1146.7837,1025.7969},  //359.9744,0,0,0,0,0,0); // ballas szef
{2199.6646,-1141.6234,1029.7969},  //188.7711,0,0,0,0,0,0); // WG w Hotelu Grove
{2223.7266,-1154.1200,1025.7969},  //356.8411,0,0,0,0,0,0); // ballas
{2198.9460,-1141.7080,1029.7969},  //180.4328,0,0,0,0,0,0); // groove
{2223.0364,-1153.9941,1025.7969},  //345.1959,0,0,0,0,0,0); // WG w Hotelu Ballas
{2198.2361,-1141.6545,1029.7969},  //192.2413,0,0,0,0,0,0); // WG w Hotelu Grove
{2223.7266,-1154.1200,1025.7969},  //356.8411,0,0,0,0,0,0); // ballas
{2197.4399,-1141.8280,1029.7969},  //181.0595,0,0,0,0,0,0); // groove
{2221.6450,-1154.0387,1025.7969},  //0.2361,0,0,0,0,0,0); // WG w Hotelu Ballas
{2196.7146,-1141.7953,1029.7969},  //181.5878,0,0,0,0,0,0); // WG w Hotelu Grove
{2220.9382,-1153.9764,1025.7969},  //354.9611,0,0,0,0,0,0); // ballas
{2195.9392,-1141.7178,1029.7969},  //181.0595,0,0,0,0,0,0); // groove
{2220.2681,-1154.2346,1025.7969},  //3.3694,0,0,0,0,0,0); // WG w Hotelu Ballas
{2195.2522,-1141.5980,1029.7969},  //169.3443,0,0,0,0,0,0); // WG w Hotelu Grove
{2219.4299,-1154.0747,1025.7969},  //352.4544,0,0,0,0,0,0); // ballas
{2194.5583,-1141.4988,1029.7969},  //182.9395,0,0,0,0,0,0); // groove
{2218.7595,-1153.8510,1025.7969},  //349.9194,0,0,0,0,0,0); // WG w Hotelu Ballas
{2193.8486,-1141.5562,1029.7969},  //177.4910,0,0,0,0,0,0); // WG w Hotelu Grove
{2218.0635,-1153.8405,1025.7969},  //0.9145,0,0,0,0,0,0); // ballas
{2193.1404,-1141.6055,1029.7969},  //176.0461,0,0,0,0,0,0); // groove
{2217.3538,-1153.7147,1025.7969},  //350.5460,0,0,0,0,0,0); // WG w Hotelu Ballas
{2192.4648,-1141.4686,1029.7969},  //185.0111,0,0,0,0,0,0); // WG w Hotelu Grove
{2225.6538,-1144.8978,1025.7969},  //88.0219,0,0,0,0,0,0); // ballas
{2191.7498,-1141.5396,1029.7969},  //173.8527,0,0,0,0,0,0); // groove
{2225.4771,-1145.5773,1025.7969},  //77.9901,0,0,0,0,0,0); // WG w Hotelu Ballas
{2191.0283,-1141.6760,1029.7969},  //172.8143,0,0,0,0,0,0); // WG w Hotelu Grove
{2225.4387,-1146.2771,1025.7969},  //85.5152,0,0,0,0,0,0); // ballas
{2190.2075,-1141.6069,1029.7969},  //173.8527,0,0,0,0,0,0); // groove
{2225.3196,-1146.9786,1025.7969}   //89.6069,0,0,0,0,0,0); // WG w Hotelu Ballas
};
THEY GO 1 BY ONE I WANT THE FIRST PERSON TO SPAWN TO COME TO ONE TEAM AND THE OTHER TO THE OTHER TEAM AND EVEN IN THIS CODE I GET AN ERROR :/

Код:
: error 018: initialization data exceeds declared size
SO HOW CAN I GET RID OF THAT ERROR AND MAKE THOSE PPL SPAWN 1 TO A TEAM AND GET A SKIN AND THE OTHER ONE TO THE OTHER TEAM AND GET THE OTHER SKIN?
Reply
#7

Use enums

pawn Код:
enum gSpawnInfo
{
    Float:PosX,
    Float:PosY,
    Float:PosZ,
    pSkin
};
Then use:
http://pastebin.com/m47d483ba

remember to change SKINID to the wanted skin.
and to use it do for an example:
pawn Код:
SetPlayerPos( playerid, gHotelPlayerSpawns[ 0 ][ PosX ], gHotelPlayerSpawns[ 0 ][ PosY ], gHotelPlayerSpawns[ 0 ][ PosZ ] );
SetPlayerSkin( playerid, gHotelPlayerSpawns[ 0 ][ pSkin ] );
Good luck!
Reply
#8

WHAT SHOULD I CHANGE TO USE ANGLE INSTED OF SKIN AT THE END?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)