30.03.2013, 10:51
Hey All,
i have this script under OnPlayerRequestClass :-
i want to add score limits to it.
Like 20 Scores to Be a Bus Driver and 100 To be a Police Officer.
If they do not have that much score, they should not be spawned and sent a Message :"You need ... to be ..."
Thanks.
i have this script under OnPlayerRequestClass :-
Код:
public OnPlayerRequestClass(playerid, classid) { SetPlayerPos(playerid, -1566.880859, -2729.819824, 48.743457); SetPlayerFacingAngle(playerid, 56.649963); SetPlayerCameraLookAt(playerid, -1566.880859, -2729.819824, 48.743457); SetPlayerCameraPos(playerid, -1566.880859 + (10 * floatsin(-56.649963, degrees)), -2729.819824 + (10 * floatcos(-56.649963, degrees)), 48.743457); switch(classid) // Switching between the classids { case 0..2: { SetPlayerTeam(playerid, Trucker); // Setting players team GameTextForPlayer(playerid, "~w~Trucker", 1000, 3); // Screen msg for player to show what team } case 3..4: { SetPlayerTeam(playerid, BusDriver); // Same as above GameTextForPlayer(playerid, "~y~Bus Driver", 1000, 3); // Same as above } case 5..7: { SetPlayerTeam(playerid, Police); // Same as above GameTextForPlayer(playerid, "~b~Police", 1000, 3); // Same as above } } return 1; }
Like 20 Scores to Be a Bus Driver and 100 To be a Police Officer.
If they do not have that much score, they should not be spawned and sent a Message :"You need ... to be ..."
Thanks.