IfPlayerLogged -
[GOD]Dragonster82 - 03.10.2011
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?
Re: IfPlayerLogged -
TheLazySloth - 03.10.2011
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;
}
Re: IfPlayerLogged -
[GOD]Dragonster82 - 03.10.2011
Edit:
(594) : error 029: invalid expression, assumed zero
Error
Re: IfPlayerLogged -
[HiC]TheKiller - 03.10.2011
You should look into using Player Variables for this instance.
https://sampwiki.blast.hk/wiki/SetPVarInt
https://sampwiki.blast.hk/wiki/GetPVarInt
Re: IfPlayerLogged -
[GOD]Dragonster82 - 03.10.2011
To take it literally.
SetPVarInt(playerid, "Name", GetPlayerName(playerid));
Doesn't works