Help, please!
#1

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
Reply
#2

The error line is SendClientMessageToAll(TEAM_GREEN,0xFFFFFFFF,msg);
Reply
#3

The code seems old. Why you aren't using sscanf?
Reply
#4

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);
    }
}
Reply
#5

well, there is no errors, but when i type in the game /t text nothing happen. Whats wrong?
Reply
#6

Did you place this at the spawn

pawn Код:
SetPlayerTeam(playerid, TEAM_GREEN);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)