Help, please! - 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: Help, please! (
/showthread.php?tid=279320)
Help, please! -
Setkus - 26.08.2011
Hey guys,
I have one error, and i dont know how to fix it...
Heres the code:
if (!strcmp("/t", cmdtext, true,2))
{
if(!cmdtext[3])
return
SendClientMessage(playerid,0xFFFFFFFF,"Kalbeti per racija savo komandai: /t [tekstas]");
new msg[128],pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
format(msg,sizeof(msg),"[USA] %s: %s",pname,cmdtext[3]);
SendClientMessageToAll(TEAM_GREEN,0xFFFFFFFF,msg);
return 1;
}
heres the error:
D:\GTA SA\Usa vs. Mec\gamemodes\map3.pwn(1131) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Please, help... Thanks
Re: Help, please! -
Setkus - 26.08.2011
The error line is SendClientMessageToAll(TEAM_GREEN,0xFFFFFFFF,msg);
Re: Help, please! -
Kingunit - 26.08.2011
The code seems old. Why you aren't using sscanf?
Re: Help, please! -
FireCat - 26.08.2011
Quote:
Originally Posted by Setkus
The error line is SendClientMessageToAll(TEAM_GREEN,0xFFFFFFFF,msg);
|
pawn Код:
for(new i = 0; i < MAX_PLAYERS;i++)
{
if(GetPlayerTeam(i) == TEAM_GREEn)
{
SendClientMessage(i,0xFFFFFFFF,msg);
}
}
Re: Help, please! -
Setkus - 26.08.2011
well, there is no errors, but when i type in the game /t text nothing happen. Whats wrong?
Re: Help, please! -
Pinguinn - 26.08.2011
Did you place this at the spawn
pawn Код:
SetPlayerTeam(playerid, TEAM_GREEN);