Vice City Multiplayer
VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: sseebbyy on June 24, 2011, 11:48:25 pm
-
I do not know how to explain it too well ...
[PAWN]
I like when there are more players on the server, only one can make a skin, and others to have skin that hang
How?
For Example: there are 3 players on the server, and I have chosen me to be a cop, the other two can not select all the police.
-
I think it should be this way:
function onPlayerSpawn {
get current skin (possible? i think it is)
while (loop for all players) {
if selected players skin == spawned players skin {
kill.spawnedplayer()
}
}
}
Hope that helps :).
-
of course, thank you ! ;D ;D ;D
I think is possible !
Thank You Very Much ! ;D ;D
-
I don't know if PAWN has onPlayerRequestSkin(), but then you could use the announce function to display "skin not available".
And one small note. In the while loop for all players, exclude the spawned player
while (loop for all players) {
if ( selected players skin == spawned players skin ) && ( spawned player ID != selected player ID) {
kill.spawnedplayer()
}
}
-
I have any idea
look :
[pawn]new IsPRChosen;
public OnPlayerDeath(playerid, killerid, reason)
{
if(PR[playerid] == 1) {
SendClientMessage(playerid,COLOR_YELLOW,"test");
if(IsPRChosen == 1) {
IsPRChosen = 0;
}
}
return 1;
}
public OnPlayerSpawn(playerid,classid,teamid)
{
ToggleWidescreenForPlayer(playerid,0);
if(PR[playerid] == 1) {
if(IsPRChosen == 0) {
PR[playerid] = 1;
IsPRChosen = 1;
}
if(IsPRChosen == 1) {
GameTextForPlayer(playerid,"~o~Is Busy This Skin !");
SetPlayerHealth(playerid,0);
}
}
return 1;
}
public OnPlayerRequestClass(playerid, classid, skinid)
{
if(classid == 0) {
if(IsPRChosen == 0) {
PR[playerid] = 1;
SetPlayerSkin(playerid,0);
GameTextForPlayerBottom(playerid,"~y~President");
}
if(IsPRChosen == 1) {
GameTextForPlayerBottom(playerid,"~o~Busy");
}
}
return 1;
}[/pawn]
But, at spawn , killed me imediatly...
Why?
I solved problem with one timer on onplayerspawn ;D
TOPIC CLOSED
not work
-
I solved the problem... needed to add if(IsPRChosen == 1) { first, not if(IspPRChosen == 0) { first.
----Topic Closed------