public OnPlayerConnect(playerid) { new pName[MAX_PLAYER_NAME]; GetPlayerName(playerid,pName,sizeof(pName);//probably messed that up bad if(pName == "con"){ Kick(playerid); } //rest of player connect return 1; }
C:\Users\Alex\Desktop\HydraX\Stunt Paradise 0.3a\pawno\include\cps.inc(140) : warning 208: function with tag result used before definition, forcing reparse C:\Users\Alex\Desktop\Stunt Paradise 0.3a\gamemodes\SP.pwn(1021) : error 027: invalid character constant C:\Users\Alex\Desktop\Stunt Paradise 0.3a\gamemodes\SP.pwn(1021) : error 017: undefined symbol "on" C:\Users\Alex\Desktop\Stunt Paradise 0.3a\gamemodes\SP.pwn(1021 -- 1022) : error 029: invalid expression, assumed zero C:\Users\Alex\Desktop\Stunt Paradise 0.3a\gamemodes\SP.pwn(1021 -- 1022) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. |
Originally Posted by Don Correlli
Check the sa:mp wiki and search for strcmp function (you can use it to compare two strings) and also check PAWN basics.
|
public OnPlayerConnect(playerid) { new pName[MAX_PLAYER_NAME]; GetPlayerName(playerid,pName,sizeof(pName));//probably messed that up bad if(strcmp(pName,"con",true)) Kick(playerid); //rest of player connect return 1; }
Originally Posted by CJ101
Код:
public OnPlayerConnect(playerid) { new pName[MAX_PLAYER_NAME]; GetPlayerName(playerid,pName,sizeof(pName));//probably messed that up bad if(strcmp(pName,"con",true)) Kick(playerid); //rest of player connect return 1; } |