[Script error]
#1

if(strcmp(cmd, "/givemem4", true) == 0) {
SendPlayerFormattedText(playerid,"you have given yourself m4 gun",0);
GivePlayerWeapon(31 , 5000)
return 1;
}

if(strcmp(cmd, "/rg", true) == 0) {
SendPlayerFormattedText(playerid,"you teleported to Restaurant and Gym Place",0);
SetPlayerPos(3749, 1763.0972900391, -1696.1018066406, 18.313640594482)
return 1;
}
i did those commands but i recieve an error
Код:
C:\DOCUME~1\DOWNLO~1\Desktop\server\GAMEMO~1\lvdm.pwn(237) : error 010: invalid function or declaration
C:\DOCUME~1\DOWNLO~1\Desktop\server\GAMEMO~1\lvdm.pwn(239) : error 021: symbol already defined: "GivePlayerWeapon"
C:\DOCUME~1\DOWNLO~1\Desktop\server\GAMEMO~1\lvdm.pwn(240) : error 010: invalid function or declaration
C:\DOCUME~1\DOWNLO~1\Desktop\server\GAMEMO~1\lvdm.pwn(242) : error 010: invalid function or declaration
C:\DOCUME~1\DOWNLO~1\Desktop\server\GAMEMO~1\lvdm.pwn(244) : error 021: symbol already defined: "SetPlayerPos"
C:\DOCUME~1\DOWNLO~1\Desktop\server\GAMEMO~1\lvdm.pwn(245) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Reply
#2

pawn Код:
if(strcmp(cmd,"/givemem4",true) == 0)
{
    SendClientMessage(playerid,COLOR_GREEN,"You Have given youself m4 gun");
    GivePlayerWeapon(playerid, 31, 5000);
    return 1;
}


if(strcmp(cmd,"/rg",true) == 0)
{
    SendClientMessage(playerid,COLOR_RED,"You Have teleported to Restaurant and Gym Place");
    SetPlayerPos(playerid, 1763.0972900391, -1696.1018066406, 18.313640594482);
    return 1;
}
lol, my bad if it doesn't work, but i have not been working with strcmp for a whillllllllllleeeeeee....
Reply
#3

it's
Код:
GivePlayerWeapon
not giveplayerweapon
Reply
#4

@ l3th4l i did it but now i get another Error
Код:
C:\DOCUME~1\DOWNLO~1\Desktop\server\GAMEMO~1\lvdm.pwn(237) : error 010: invalid function or declaration
C:\DOCUME~1\DOWNLO~1\Desktop\server\GAMEMO~1\lvdm.pwn(241) : error 010: invalid function or declaration
C:\DOCUME~1\DOWNLO~1\Desktop\server\GAMEMO~1\lvdm.pwn(245) : error 010: invalid function or declaration
C:\DOCUME~1\DOWNLO~1\Desktop\server\GAMEMO~1\lvdm.pwn(249) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
@ ThEKing i Did that already read before you post that so dont say as you like
Reply
#5

Код:
 public OnPlayerCommandText(playerid, cmdtext[])
{

if(strcmp(cmd, "/givemem4", true) == 0) 
{
SendPlayerFormattedText(playerid,"you have given yourself m4 gun",0);
GivePlayerWeapon(31 , 5000)
return 1;
}

if(strcmp(cmd, "/rg", true) == 0) 
{
SendPlayerFormattedText(playerid,"you teleported to Restaurant and Gym Place",0);
SetPlayerPos(3749, 1763.0972900391, -1696.1018066406, 18.313640594482)
return 1;
}


return 0;
}
Since it's inside of OnPlayercommandText
Reply
#6

yea thanks , i found that before just 5 minutes from your Post ;p i forgot to edit the Post to [SOLVED] :P
Thanks anyways
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)