Help me!!!!
#1

Код:
public OnPlayerConnect(playerid)
{
    if(hasAssassin == false) // If there is no Assassin on the server
	{
	    new string[64];
	    SetSpawnInfo(playerid, 0, 285, 1525.8599,938.2324,10.8203, 1,  34, 999999, 4, 1, 0, 0);
	    print(string);
	    format(string,sizeof(string),"The assassin has joined with the id: %d",playerid);
	}
	else
	{
	    new string[64];
	    print(string);
	    format(string,sizeof(string),"A guard has joined with the id: %d",playerid);
	}
	return 1;
}
Why does it print [NULL] instead?

EDIT: Oh god im stupid....
Reply
#2

You need to format the string before printing it, this should work:
pawn Код:
public OnPlayerConnect(playerid)
{
    if(hasAssassin == false) // If there is no Assassin on the server
    {
        new string[64];
        SetSpawnInfo(playerid, 0, 285, 1525.8599,938.2324,10.8203, 1,  34, 999999, 4, 1, 0, 0);
        format(string,sizeof(string),"The assassin has joined with the id: %d",playerid);
        print(string);
    }
    else
    {
        new string[64];
        format(string,sizeof(string),"A guard has joined with the id: %d",playerid);
        print(string);
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)