How to make this?
#8

Quote:
Originally Posted by Markx
Посмотреть сообщение
Okay, ill try that.

EDIT: Cant i just use OnPlayerRequestClass(playerid, classid); ?
No, you can't , because when you try to do this, the OnPlayerRequestClass(playerid, classid) is called like a normal callback, in other words, only the code that is inside it will works, like :



pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SendClientMessage(playerid,0xFFFFFFAA,"OnPlayerRequestClass was called :D !");
    return 1;
}


public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp("/test", cmdtext, true, 5))
    {
        CallLocalFunction("OnPlayerRequestClass","d",playerid);//Calls the OnPlayerRequestClass, but only the SendClientMessage code that is inside its will work. The selection of chars, teams and etc will won't appear :p.
        return 1;
    }
    return 0;
}


Well, i did a function to you, it should solve your problem :


pawn Код:
#define RequestClassForPlayer(%0);  ForceClassSelection(%0),SetPlayerHealth(%0,0),SpawnPlayer(%0);

I hope that i have helped .
Reply


Messages In This Thread
How to make this? - by Markx - 25.06.2011, 17:39
Re: How to make this? - by Donya - 25.06.2011, 17:40
Re: How to make this? - by Markx - 25.06.2011, 17:42
Re: How to make this? - by Donya - 25.06.2011, 17:44
Re: How to make this? - by Markx - 25.06.2011, 17:50
Re: How to make this? - by Willow - 25.06.2011, 17:53
Re: How to make this? - by Donya - 25.06.2011, 17:57
Re: How to make this? - by rjjj - 25.06.2011, 18:06
Re: How to make this? - by Donya - 25.06.2011, 18:08

Forum Jump:


Users browsing this thread: 2 Guest(s)