Invite in Gang
#1

can somebody tell me how to make a command to invite somebody in my mafia
i was looking on other gamemodes and i was find this :

Код:
(strcmp(cmd, "/gethimtomafia", true) == 0)
	    {
	    if(IsPlayerConnected(playerid))
	    {
	    tmp = strtok(cmdtext, idx);
	    if(!strlen(tmp))
		{
		SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /gethimtomafia [playerid/PartOfName]");
		return 1;
		}
		new para1;
		new ftext[20];
		para1 = ReturnUser(tmp);
	    if(IsPlayerConnected(para1))
	    {
        if(para1 != INVALID_PLAYER_ID)
	    {
		pTeam[playerid] = team_streetr;
		}
		return 1;
		}
but i was make some changes ,, and i have errors

theres my team:

Код:
  new pTeam[MAX_PLAYERS];
		#define team_streetr 1
and i want make one command to invite someone i my team .,, please help
Reply
#2

Do u have sscanf plugin?? so i could help
Reply
#3

Error lines?
Reply
#4

aww error lines are too long 26 its something really bad ,, but ok there is :
Quote:

C:\Documents and Settings\xy\Desktop\SAMP\ravens\Raven's Roleplay 0.3c\filterscripts\neon.pwn(443) : error 017: undefined symbol "cmd"
C:\Documents and Settings\xy\Desktop\SAMP\ravens\Raven's Roleplay 0.3c\filterscripts\neon.pwn(447) : error 017: undefined symbol "tmp"
C:\Documents and Settings\xy\Desktop\SAMP\ravens\Raven's Roleplay 0.3c\filterscripts\neon.pwn(447) : error 017: undefined symbol "strtok"
C:\Documents and Settings\xy\Desktop\SAMP\ravens\Raven's Roleplay 0.3c\filterscripts\neon.pwn(44 : error 017: undefined symbol "tmp"
C:\Documents and Settings\xy\Desktop\SAMP\ravens\Raven's Roleplay 0.3c\filterscripts\neon.pwn(450) : error 017: undefined symbol "COLOR_GRAD2"
C:\Documents and Settings\xy\Desktop\SAMP\ravens\Raven's Roleplay 0.3c\filterscripts\neon.pwn(455) : error 017: undefined symbol "ReturnUser"
C:\Documents and Settings\xy\Desktop\SAMP\ravens\Raven's Roleplay 0.3c\filterscripts\neon.pwn(454) : warning 204: symbol is assigned a value that is never used: "ftext"
C:\Documents and Settings\xy\Desktop\SAMP\ravens\Raven's Roleplay 0.3c\filterscripts\neon.pwn(677) : error 029: invalid expression, assumed zero
C:\Documents and Settings\xy\Desktop\SAMP\ravens\Raven's Roleplay 0.3c\filterscripts\neon.pwn(677) : error 004: function "Streamer_OnPlayerPickUpPickup" is not implemented
C:\Documents and Settings\xy\Desktop\SAMP\ravens\Raven's Roleplay 0.3c\filterscripts\neon.pwn(679) : error 017: undefined symbol "pickupid"
C:\Documents and Settings\xy\Desktop\SAMP\ravens\Raven's Roleplay 0.3c\filterscripts\neon.pwn(680) : error 017: undefined symbol "pickupid"
C:\Documents and Settings\xy\Desktop\SAMP\ravens\Raven's Roleplay 0.3c\filterscripts\neon.pwn(682) : error 017: undefined symbol "pickupid"
C:\Documents and Settings\xy\Desktop\SAMP\ravens\Raven's Roleplay 0.3c\filterscripts\neon.pwn(684) : error 017: undefined symbol "pickupid"
C:\Documents and Settings\xy\Desktop\SAMP\ravens\Raven's Roleplay 0.3c\filterscripts\neon.pwn(692) : error 017: undefined symbol "pickupid"
C:\Documents and Settings\xy\Desktop\SAMP\ravens\Raven's Roleplay 0.3c\filterscripts\neon.pwn(702) : warning 225: unreachable code
C:\Documents and Settings\xy\Desktop\SAMP\ravens\Raven's Roleplay 0.3c\filterscripts\neon.pwn(702) : error 029: invalid expression, assumed zero
C:\Documents and Settings\xy\Desktop\SAMP\ravens\Raven's Roleplay 0.3c\filterscripts\neon.pwn(702) : error 004: function "OnPlayerUpdate" is not implemented
C:\Documents and Settings\xy\Desktop\SAMP\ravens\Raven's Roleplay 0.3c\filterscripts\neon.pwn(720) : warning 225: unreachable code
C:\Documents and Settings\xy\Desktop\SAMP\ravens\Raven's Roleplay 0.3c\filterscripts\neon.pwn(720) : error 029: invalid expression, assumed zero
C:\Documents and Settings\xy\Desktop\SAMP\ravens\Raven's Roleplay 0.3c\filterscripts\neon.pwn(720) : error 004: function "OnDialogResponse" is not implemented
C:\Documents and Settings\xy\Desktop\SAMP\ravens\Raven's Roleplay 0.3c\filterscripts\neon.pwn(723) : error 017: undefined symbol "dialogid"
C:\Documents and Settings\xy\Desktop\SAMP\ravens\Raven's Roleplay 0.3c\filterscripts\neon.pwn(725) : error 017: undefined symbol "response"
C:\Documents and Settings\xy\Desktop\SAMP\ravens\Raven's Roleplay 0.3c\filterscripts\neon.pwn(727) : error 017: undefined symbol "listitem"
C:\Documents and Settings\xy\Desktop\SAMP\ravens\Raven's Roleplay 0.3c\filterscripts\neon.pwn(73 : error 017: undefined symbol "listitem"
C:\Documents and Settings\xy\Desktop\SAMP\ravens\Raven's Roleplay 0.3c\filterscripts\neon.pwn(751) : error 017: undefined symbol "listitem"
C:\Documents and Settings\xy\Desktop\SAMP\ravens\Raven's Roleplay 0.3c\filterscripts\neon.pwn(764) : error 017: undefined symbol "listitem"
C:\Documents and Settings\xy\Desktop\SAMP\ravens\Raven's Roleplay 0.3c\filterscripts\neon.pwn(776) : error 017: undefined symbol "listitem"
C:\Documents and Settings\xy\Desktop\SAMP\ravens\Raven's Roleplay 0.3c\filterscripts\neon.pwn(789) : error 017: undefined symbol "listitem"
C:\Documents and Settings\xy\Desktop\SAMP\ravens\Raven's Roleplay 0.3c\filterscripts\neon.pwn(802) : error 017: undefined symbol "listitem"

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


26 Errors.

Reply
#5

pawn Код:
(strcmp(cmd, "/gethimtomafia", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
        SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /gethimtomafia [playerid/PartOfName]");
        return 1;
    }
    new para1;
    new ftext[20];
    para1 = ReturnUser(tmp);
    if(IsPlayerConnected(para1))
    {
        if(para1 != INVALID_PLAYER_ID)
        {
            pTeam[playerid] = team_streetr;
        }
        return 1;
    }
    return 1;
}
Reply
#6

Add 2 } on the end
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)