callback
#1

Hi.

How can I call a callback?

Example this
pawn Код:
public OnPlayerRequestSpawn(playerid)
in a command or when you enter a checkpoint?
Reply
#2

pawn Код:
CallRemoteFunction(const function[], const format[], {Float,_}:...)
CallLocalFunction(const function[], const format[], {Float,_}:...)
Reply
#3

How can I use this?
Reply
#4

CallRemoteFunction("OnPlayerRequestSpawn", "s", "Yo man")
Reply
#5

maybe I said wrong.. but that wasnt what I was looking for..

I have classes, when you spawn with it, it says "Welcome to Baby Killer" e.g
Now when he changes via going in to a checkpoint or by a cmd, I want it to change that message to a rank he choose.

So like the Onplayerrequestspawn gets called and will say "Welcome to Noob Killer" if thats the rank he choose i mean like that. I hope u undestand
Reply
#6

pawn Код:
ForceClassSelection(playerid);
Reply
#7

yeah i know about that one, but then you need to get killed. I want it to automaticly change the skin(of the rank he choose) and then show the Welcome Message.

Like this.

Go in a checkpoint, then right after, it sets the Player skin, I can do that with SetPlayerSkin, and then it says "Welcome to .." whatever rank it is.
Reply
#8

Well, I don't see a problem. Just set his skin and send the message?

And btw, I won't use CallLocalFunction though. I'd rather just use the callback like it's a stock (probably it's slower, I do some tests soon)
Reply
#9

Not what I was looking for ******.

I want this

pawn Код:
if(gTeam[playerid]==TEAM_PROFESSIONAL)
{
    if(GetPlayerRank(playerid) == 5)
    {
    format(tmp,sizeof(tmp),"Welcome to Professional Killer: %s",PlayerName(playerid));
    SendClientMessageToAll(TEAM_PROFESSIONAL_COLOR,tmp);
    return 1;
    }
    else
    {
    SendClientMessage(playerid,Red,"You are not a Professional Killer !");
    }
    return 0;
}
return 1;
}
Then lets say I enter a checkpoint then it says "Welcome to Professional Killer"

and I have this /giverank cmd..

I dont wanna make for each ID, messages like that, it will be a big code

I got this on my /giverank cmd

pawn Код:
CallLocalFunction("OnPlayerRequestSpawn", "ii", playerid, tmp);
Reply
#10

Ok. I will try explain again.

I have a cmd, /giverank, I have rank between 1-5.

Rank 1: Beginner Killer
Rank 2: Noob Killer
etc up to
Rank 5: Professional Killer.

Everytime someone spawns first time(not when you die or something) example it will say "Welcome to Noob Killer"
So, if i give any rank(from 1-5), I will use Rank 2. So when I give rank 2, it should say "Welcome to Noob Killer" and set his skin to that rank(each rank has a specific skin), I dont want to kick/kill the player. And I dont wanna make a big code with each ID with the welcome messages as I also have those tags, where you helped me, so the code will be alot longer.

Why I dont wanna make each rank is this reason

http://pastebin.com/wpXCj4G2

and I am thinking to add more ranks, so please help me
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)