IfPlayerLogged
#1

pawn Код:
public OnPlayerSpawn(playerid)
{
new CheckForDarren[MAX_PLAYER_NAME];
GetPlayerName(playerid,CheckForDarren,sizeof(CheckForDarren));
    if(skink==270) && CheckForDarren == "Darren_Kok" {
    new string[128];
    format(string,sizeof(string),"Welcome back Darren")
    SetPlayerTeam(playerid, 1);
    GangRank[playerid] = 1337;
    SendClientMessage(COLOR_PURPLE,string);
    }
    return 1;
Ignore the ranks and stuff, but how can i use IsPlayerLogged from Luxadmin to my gamemode script?
Reply
#2

public OnPlayerSpawn(playerid)
{
new CheckForDarren[MAX_PLAYER_NAME];
GetPlayerName(playerid,CheckForDarren,sizeof(Check ForDarren));
if(skink==270) && CheckForDarren == "Darren_Kok" {
new string[128];
format(string,sizeof(string),"Welcome back Darren")
SetPlayerTeam(playerid, 1);
GangRank[playerid] = 1337;
SendClientMessage(COLOR_PURPLE,string);
}
return 1;

should be...

public OnPlayerSpawn(playerid)
{
new CheckForDarren[MAX_PLAYER_NAME];
GetPlayerName(playerid,CheckForDarren,sizeof(Check ForDarren));
if(skink==270 && strcmp(CheckForDarren, "Darren_Kok", true) {
new string[128];
format(string,sizeof(string),"Welcome back Darren")
SetPlayerTeam(playerid, 1);
GangRank[playerid] = 1337;
SendClientMessage(COLOR_PURPLE,string);
}
return 1;
}
Reply
#3

Edit:

(594) : error 029: invalid expression, assumed zero

Error
Reply
#4

You should look into using Player Variables for this instance.

https://sampwiki.blast.hk/wiki/SetPVarInt
https://sampwiki.blast.hk/wiki/GetPVarInt
Reply
#5

To take it literally.
SetPVarInt(playerid, "Name", GetPlayerName(playerid));

Doesn't works
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)