Player doesnt get weapons
#1

Код:
public OnPlayerRequestClass(playerid, classid)
{
	if(hasAssassin == false) // If there is no Assassin on the server he becomes it
	{
	    new string[64];
	    SetSpawnInfo(playerid, 0, 285, 1525.8599,938.2324,10.8203, 1,  0, 0, 0, 0, 0, 0);
	    format(string,sizeof(string),"The assassin has joined with the id: %d",playerid);
	    print(string);
	    PlayerVar[playerid][isAssassin] = 1;
	    SpawnPlayer(playerid);
	    GivePlayerWeapon(playerid, 34, 99999999);
	    GivePlayerWeapon(playerid, 4, 1);
	    GivePlayerWeapon(playerid, 44, 1);
	    SetPlayerColor(playerid, 0xFFF0000);
	    TextDrawColor(gTextDraw, 0xFF01111);
		TextDrawSetString(gTextDraw, "You are the assassin, type /help for help.");
		TextDrawShowForPlayer(playerid, gTextDraw);
		SetTimer("destroy", 8000, false);
	}
Why dont i get my guns?
Reply
#2

You can give the player 3 guns in SetSpawnInfo, should work:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    if(hasAssassin == false) // If there is no Assassin on the server he becomes it
    {
        new string[64];
        SetSpawnInfo(playerid, 0, 285, 1525.8599,938.2324,10.8203, 1,  34, 99999, 4, 1, 44, 1);
        format(string,sizeof(string),"The assassin has joined with the id: %d",playerid);
        print(string);
        PlayerVar[playerid][isAssassin] = 1;
        SpawnPlayer(playerid);
        SetPlayerColor(playerid, 0xFFF0000);
        TextDrawColor(gTextDraw, 0xFF01111);
        TextDrawSetString(gTextDraw, "You are the assassin, type /help for help.");
        TextDrawShowForPlayer(playerid, gTextDraw);
        SetTimer("destroy", 8000, false);
    }
Reply
#3

Quote:
Originally Posted by dubyabeast
Посмотреть сообщение
You can give the player 3 guns in SetSpawnInfo, should work:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    if(hasAssassin == false) // If there is no Assassin on the server he becomes it
    {
        new string[64];
        SetSpawnInfo(playerid, 0, 285, 1525.8599,938.2324,10.8203, 1,  34, 99999, 4, 1, 44, 1);
        format(string,sizeof(string),"The assassin has joined with the id: %d",playerid);
        print(string);
        PlayerVar[playerid][isAssassin] = 1;
        SpawnPlayer(playerid);
        SetPlayerColor(playerid, 0xFFF0000);
        TextDrawColor(gTextDraw, 0xFF01111);
        TextDrawSetString(gTextDraw, "You are the assassin, type /help for help.");
        TextDrawShowForPlayer(playerid, gTextDraw);
        SetTimer("destroy", 8000, false);
    }
Still doesnt give them?! what the hell is going on
Reply
#4

Do you have an anti-cheat?
Reply
#5

Give the weapons under OnPlayerSpawn, not OnPlayerRequestClass.
Reply
#6

Quote:
Originally Posted by SuperViper
Посмотреть сообщение
Give the weapons under OnPlayerSpawn, not OnPlayerRequestClass.
Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)