Why doesn't this work - 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: Why doesn't this work (
/showthread.php?tid=169192)
Why doesn't this work -
mrcoolballs - 18.08.2010
OKAY im really new here, I used to be a decent scripter like 3 years ago but then i stopped and now im back and cant remember anything, somone help me out with these basics:
Код:
public OnPlayerConnect(playerid)
{
if GetPlayerName(playerid,"mrcoolballs")(
SendClientMessage(playerid,0xAA3333AA,"яour to cool for school")else(
SendClientMessage(playerid,0xAA3333AA,"yah you aint cool like mrcoolballs");
return 1;
}
}
why doesn't it work

?!?!?!?!

Re: Why doesn't this work -
R@ger - 18.08.2010
lol its a failed code
Код:
public OnPlayerConnect(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
if(!strfind(name, "mrcoolballs", true))
{
SendClientMessage(playerid,0xAA3333AA,"яour to cool for school")
}
else
{
SendClientMessage(playerid,0xAA3333AA,"yah you aint cool like mrcoolballs");
}
return 1;
}
Re: Why doesn't this work -
billiout - 18.08.2010
Код:
public OnPlayerConnect(playerid)
{
new PlayerName[24];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
if(!strcmp(PlayerName,"mrcoolballs",true))
{
SendClientMessage(playerid,0xAA3333AA,"яour to cool for school");
}
return 1;
}
i think that you mean.
Re: Why doesn't this work -
mrcoolballs - 18.08.2010
sorry if im wrong but wouldnt that send me the message yah you aint cool like mrcoolballs if my name was mrcoolballs,your forgetting the ! before strfind