SA-MP Forums Archive
Clan Tag Locking Teams - 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)
+--- Thread: Clan Tag Locking Teams (/showthread.php?tid=448853)



Clan Tag Locking Teams - Jay_Dixon - 06.07.2013

Ok, same issue as always, so i'll just post the code and errors here. There's obviously something i'm doing wrong, and you guys have always managed to point out the small things i've missed :3

Код:
C:\Users\Jay\Desktop\GangWarsV.0.1.B\gamemodes\GWDMv1.pwn(1162) : error 035: argument type mismatch (argument 2)
Код:
       case 36..39:
       {
		 new playername[MAX_PLAYER_NAME];
		 GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
		 if(!strfind("[o_O]", true) == 0)
		 {
		    SendClientMessage(playerid, COLOR_LIGHTBLUE, "You are not in Owl Balistics!");
		    SetPlayerTeam(playerid, TEAM_RAPPERS);
		 }
         SetPlayerPos(playerid,2752.8835,-2513.6389,25.7914);
         SetPlayerCameraPos(playerid,2753.1050,-2519.0244,26.6926);
         SetPlayerCameraLookAt(playerid,2752.8835,-2513.6389,25.7914);
         SetPlayerFacingAngle(playerid,180.0);
         GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~[o_O] Owl Balistics", 3000, 3);
         ApplyAnimation(playerid,"GYMNASIUM", "GYMshadowbox",4.0,1,1,1,1,1);
       }



Re: Clan Tag Locking Teams - ToiletDuck - 06.07.2013

pawn Код:
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));



Re: Clan Tag Locking Teams - Income - 06.07.2013

Quote:
Originally Posted by ToiletDuck
Посмотреть сообщение
PHP код:
new playername[MAX_PLAYER_NAME];
GetPlayerName(playeridplayernamesizeof(playername)); 
It's the same as he written...
PHP код:
new playername[MAX_PLAYER_NAME];
GetPlayerName(playeridplayernameMAX_PLAYER_NAME); 
MAX_PLAYER_NAME refers to 24, so you can either put the number instead of the MAX_PLAYER_NAME, or alter that with sizeof(playername) which automatically generates the space.