You must put the texts at the public OnPlayerRequestClass...
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
switch(classid) // Instead of use a lot of conditions, we go directly to the classid condition
{
case 0: GameTextForPlayer(playerid,"This Is An ~r~Red Exemple!",3000,2); // show this text is classid is 0, (First AddPlayerClass)
case 1: GameTextForPlayer(playerid,"This Is An ~b~Blue Exemple!",3000,2); // show this text is classid is 1, (Second AddPlayerClass)
case 3: GameTextForPlayer(playerid,"This Is An ~r~Green Exemple!",3000,2);
case 4: GameTextForPlayer(playerid,"This Is An ~p~Pink Exemple!",3000,2);
}
return 1;
}
And about the dialog, use ShowPlayerDialog function and OnPlayerDialogResponse to get the player responses.
https://sampforum.blast.hk/showthread.php?tid=379247 - Tutorial
Randon skin is easy too, just create an array to store the skin numbers and do a Random selection over these array numbers...
At The Top
pawn Код:
new TuckerSkins[10] // Create a 10 "slots" variable and assign a skin value for each "slot" (Remeber: Slots are 0-9, not 1-10)
{
1,2,3,4,5,6,7,8,9,10
}
Now call this stock function where you want (such as OnPlayerSpawn, CMD, etc)
pawn Код:
SetPlayerRandomTruckerSkin(playerid);
And put the stock at the end of the script
pawn Код:
stock SetPlayerRandomTruckerSkin(playerid)
{
new resultskin = random(sizeof TruckerSkins);
SetPlayerSkin(playerid,resultskin);
}