SA-MP Forums Archive
help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: help (/showthread.php?tid=247930)



help - fissekarl - 11.04.2011

Hello

I have done this and its not working

pawn Код:
forward RankUp(playerid);
public RankUp(playerid)
{
    new tmp[128], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    if(gTeam[playerid]==TEAM_TEST)
    {
        SetPlayerSkin(playerid, 299);
        SetPlayerColor(playerid, -1);
        format(tmp, sizeof(tmp), "Welcome to Test: %s",PlayerName(playerid));
        SendClientMessageToAll(GetPlayerColor(playerid),tmp);
        return 1;
    }
    return 1;
}
Now if I rank up to that rank, it doesnt send anything, no messages Why?


Re: help - CyNiC - 11.04.2011

Probably happens because you do not applied to the player who comes into gTeam to TEAM_TEST.


Re: help - fissekarl - 11.04.2011

Can you show me please? How to do that?

Because I need to use that alot


Re: help - aircombat - 11.04.2011

u can use under OnPlayerRequestSpawn :

pawn Код:
if(classid == 1) // change 1 to the class id the test team belong
{
       gTeam[playerid] == TEAM_TEST;
}



Re: help - fissekarl - 11.04.2011

undefined symbol "classid"

Also isnt there an other better way?


Re: help - fissekarl - 11.04.2011

Hm anyone?


Re: help - fissekarl - 14.04.2011

Still need help with this, it doesnt show any messages, I think
cynic is right, but can anyone make that code, thanks


Re: help - Sascha - 14.04.2011

pawn Код:
new gClassid[MAX_PLAYERS];
public OnPlayerRequestClass(playerid, classid)
{
  gClassid[playerid] = classid;
  return 1;
}

public OnPlayerRequestSpawn(playerid)
{
  if(gClassid[playerid] == 1) // change 1 to the class id the test team belong
  {
       gTeam[playerid] = TEAM_TEST;
  }
  return 1;
}



Re: help - fissekarl - 14.04.2011

Thanks Sascha, but what should I add in the public RankUp because its not working if I just add that what you posted


Re: help - Sascha - 14.04.2011

try to change "SetPlayerColor(playerid, -1)" to a valid color code...
Click here to see a list of the hex color codes..

just remove the "#" infront of it and add a "0x" infront of the number that this website will return.