29.07.2009, 04:32
Ok so I wanna make it so when a player spawns his skin will change randomly.
This is what I've got...
new mafiaskin[][1] = {{111},{112},{125},{126}};
public OnPlayerSpawn(playerid)
{
new rand = random(sizeof(mafiaskin));
SetPlayerSkin(playerid,mafiaskin[rand][1]);
}
Can anyone explain to me what the 1 in my code actually means? Like what am I suppose to put there? I can't find any guides about it. It would be much appreciated.
This is what I've got...
new mafiaskin[][1] = {{111},{112},{125},{126}};
public OnPlayerSpawn(playerid)
{
new rand = random(sizeof(mafiaskin));
SetPlayerSkin(playerid,mafiaskin[rand][1]);
}
Can anyone explain to me what the 1 in my code actually means? Like what am I suppose to put there? I can't find any guides about it. It would be much appreciated.