#include <a_samp> #define HELM_DIALOG 123456 //define the dialog ID here so it won't inflict with other dialogs on your gamemode. public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext, "/helm", true == 0) { //Using strcmp because i don't know your command processor, should be avoided anyway. if(IsPlayerAttachedObjectSlotUsed(playerid, 3)) RemovePlayerAttachedObject(playerid, 3); else SetPlayerAttachedObject(playerid, 3, 18645, 2, 0.07, 0.017, 0, 88, 75, 0); return 1; }
C:\Users\ta\Desktop\NVCNR\filterscripts\helmets.pwn(8) : warning 213: tag mismatch C:\Users\ta\Desktop\NVCNR\filterscripts\helmets.pwn(8) : error 001: expected token: ")", but found "{" C:\Users\ta\Desktop\NVCNR\filterscripts\helmets.pwn(15) : error 030: compound statement not closed at the end of file (started at line 8)
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/helm", true == 0)) { //Using strcmp because i don't know your command processor, should be avoided anyway.
if(IsPlayerAttachedObjectSlotUsed(playerid, 3))
RemovePlayerAttachedObject(playerid, 3);
else
SetPlayerAttachedObject(playerid, 3, 18645, 2, 0.07, 0.017, 0, 88, 75, 0);
return 1;
}
}
pawn Код:
|
C:\Users\ta\Desktop\NVCNR\filterscripts\helmets.pwn(8) : warning 213: tag mismatch C:\Users\ta\Desktop\NVCNR\filterscripts\helmets.pwn(15) : warning 209: function "OnPlayerCommandText" should return a value
#include <a_samp>
#define HELM_DIALOG 123456
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/helm"))
{
if(IsPlayerAttachedObjectSlotUsed(playerid, 3))
{
RemovePlayerAttachedObject(playerid, 3);
}
else
{
SetPlayerAttachedObject(playerid, 3, 18645, 2, 0.07, 0.017, 0, 88, 75, 0);
}
}
return 1;
}
pawn Код:
|