03.01.2012, 11:54
So I have this script:
Is there anyway to have it on public OnPlayerRequestSpawn instead of public OnPlayerRequestClass?
Because currently, when your looking through the characters, When you go past ID1 it says "You are not the mighty vrondakis" and puts you back to the previous skin.
I want it to do the exactly same thing but only when you press the spawn button.
Here's what I tried:
But I get error:
pawn Код:
public OnPlayerRequestClass(playerid,classid)
{
if(classid == vrondakisclass) // if class id is vrondakisclass
{
if(!PlayerNameIs(playerid, "Vrondakis")) // and player's name is not Vrondakis
{
SendClientMessage(playerid,COLOR_RED,"You are not the mighty Vrondakis"); // will send a message
return 0; // and will not let them spawn
}
}
return 1;
}
Because currently, when your looking through the characters, When you go past ID1 it says "You are not the mighty vrondakis" and puts you back to the previous skin.
I want it to do the exactly same thing but only when you press the spawn button.
Here's what I tried:
pawn Код:
public OnPlayerRequestSpawn(playerid,classid)
{
if(classid == vrondakisclass) // if class id is vrondakis class
{
if(!PlayerNameIs(playerid, "Vrondakis")) // and player's name is not Vrondakis
{
SendClientMessage(playerid,COLOR_RED,"You are not the mighty Vrondakis"); // will send a message
return 0; // and will not let them spawn
}
}
return 1;
}
Код:
error 025: function heading differs from prototype