SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 11/10/2011, 12:44 AM   #1
DaRkAnGeL[NBK]
Huge Clucker
 
DaRkAnGeL[NBK]'s Avatar
 
Join Date: Sep 2011
Location: Nottingham
Posts: 273
Reputation: 2
Default GRRRRRRRR ZCMD wont work for me -.-

hey i was trying to create a new filterscript but nope not gunna work for some wierd reason as zcmd is really not wanting to work okay so basically i have zcmd.inc so the first code ill give is gunna be

pawn Code:
#include <zcmd>
okay so thats included no errors untill :

pawn Code:
public OnPlayerCommandText(playerid,cmdtext[])
{
CMD:setvip(playerid, params[])
{
    if(PlayerInfo[playerid][pAdminLevel] >= 1 || IsPlayerAdmin(playerid) == 1)
    {
        new id, level;
        if(sscanf(params,"ui", id, level) return SendClientMessage(playerid, -1,"SYNTAX: /setvip [id] [leve]");
        {
            PlayerInfo[id][pVip] = level;
        }
    }
    else SendClientMessage(playerid, -1,"You are not an Admin!");
    return 1;
}
return 0;
}
that should be correct right ?! well no -.- i now get this;

pawn Code:
C:\Users\Admin\Desktop\SAMP\Fas FreeRoam\filterscripts\saving2.pwn(163) : error 029: invalid expression, assumed zero
C:\Users\Admin\Desktop\SAMP\Fas FreeRoam\filterscripts\saving2.pwn(163) : error 017: undefined symbol "cmd_setvip"
C:\Users\Admin\Desktop\SAMP\Fas FreeRoam\filterscripts\saving2.pwn(163) : error 029: invalid expression, assumed zero
C:\Users\Admin\Desktop\SAMP\Fas FreeRoam\filterscripts\saving2.pwn(163) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
its like zcmd isnt even included
__________________
Incorporated Roleplay
Its Here!

Needing:
Admins.
Leaders.
Helpers.
Roleplayer's

Private Message Me If You Are Interested
If I Have Ever Helped You Please Give Me A Reputation Point
DaRkAnGeL[NBK] is offline   Reply With Quote
Old 11/10/2011, 12:46 AM   #2
DaRkAnGeL[NBK]
Huge Clucker
 
DaRkAnGeL[NBK]'s Avatar
 
Join Date: Sep 2011
Location: Nottingham
Posts: 273
Reputation: 2
Default Re: GRRRRRRRR ZCMD wont work for me -.-

nvm doesnt need the public OnPlayerCommandText
__________________
Incorporated Roleplay
Its Here!

Needing:
Admins.
Leaders.
Helpers.
Roleplayer's

Private Message Me If You Are Interested
If I Have Ever Helped You Please Give Me A Reputation Point
DaRkAnGeL[NBK] is offline   Reply With Quote
Old 11/10/2011, 12:46 AM   #3
Johndaonee
Big Clucker
 
Join Date: Jul 2010
Location: Denmark, Varde. Germany, Hamburg.
Posts: 190
Reputation: 46
Default Re: GRRRRRRRR ZCMD wont work for me -.-

Do not use it inside the onplayer command text, have it outside functions
Johndaonee is offline   Reply With Quote
Old 11/10/2011, 12:53 AM   #4
DaRkAnGeL[NBK]
Huge Clucker
 
DaRkAnGeL[NBK]'s Avatar
 
Join Date: Sep 2011
Location: Nottingham
Posts: 273
Reputation: 2
Default Re: GRRRRRRRR ZCMD wont work for me -.-

thanks
__________________
Incorporated Roleplay
Its Here!

Needing:
Admins.
Leaders.
Helpers.
Roleplayer's

Private Message Me If You Are Interested
If I Have Ever Helped You Please Give Me A Reputation Point
DaRkAnGeL[NBK] is offline   Reply With Quote
Old 11/10/2011, 01:06 AM   #5
DaRkAnGeL[NBK]
Huge Clucker
 
DaRkAnGeL[NBK]'s Avatar
 
Join Date: Sep 2011
Location: Nottingham
Posts: 273
Reputation: 2
Default Re: GRRRRRRRR ZCMD wont work for me -.-

okay for some reason its not make the player VIP
pawn Code:
CMD:setvip(playerid, params[])
{
    if(IsPlayerAdmin(playerid))
    {
        new id, level;
        if(sscanf(params,"ui", id, level)) return SendClientMessage(playerid, -1,"SYNTAX: /setvip [id] [level]");
        {
            PlayerInfo[id][pVIP] = level;
        }
    }
    else SendClientMessage(playerid, -1,"You are not an Admin!");
    return 1;
}
__________________
Incorporated Roleplay
Its Here!

Needing:
Admins.
Leaders.
Helpers.
Roleplayer's

Private Message Me If You Are Interested
If I Have Ever Helped You Please Give Me A Reputation Point
DaRkAnGeL[NBK] is offline   Reply With Quote
Old 11/10/2011, 01:17 AM   #6
GrimR
Huge Clucker
 
Join Date: Sep 2011
Location: Sydney
Posts: 209
Reputation: 14
Default Re: GRRRRRRRR ZCMD wont work for me -.-

Need to check if id == INVALID_PLAYER_ID as sscanf will not cause your message to be sent if the id is not valid.
GrimR is offline   Reply With Quote
Old 11/10/2011, 01:50 AM   #7
DaRkAnGeL[NBK]
Huge Clucker
 
DaRkAnGeL[NBK]'s Avatar
 
Join Date: Sep 2011
Location: Nottingham
Posts: 273
Reputation: 2
Default Re: GRRRRRRRR ZCMD wont work for me -.-

um pawn code for this please?
__________________
Incorporated Roleplay
Its Here!

Needing:
Admins.
Leaders.
Helpers.
Roleplayer's

Private Message Me If You Are Interested
If I Have Ever Helped You Please Give Me A Reputation Point
DaRkAnGeL[NBK] is offline   Reply With Quote
Old 11/10/2011, 02:10 AM   #8
GrimR
Huge Clucker
 
Join Date: Sep 2011
Location: Sydney
Posts: 209
Reputation: 14
Default Re: GRRRRRRRR ZCMD wont work for me -.-

Well I was hoping you would work it out lol.

pawn Code:
if (id == INVALID_PLAYER_ID) { return SendClientMessage(playerid, -1, "No player online with that id."); }

If an invalid ID is the reason which this message will tell you, use a valid ID lol. Other than that I see no problems.
GrimR is offline   Reply With Quote
Old 11/10/2011, 02:24 AM   #9
DaRkAnGeL[NBK]
Huge Clucker
 
DaRkAnGeL[NBK]'s Avatar
 
Join Date: Sep 2011
Location: Nottingham
Posts: 273
Reputation: 2
Default Re: GRRRRRRRR ZCMD wont work for me -.-

pawn Code:
CMD:setvip(playerid, params[])
{
    if(IsPlayerAdmin(playerid))
    {
        new id, level;
        if(sscanf(params,"ui", id, level)) return SendClientMessage(playerid, -1,"SYNTAX: /setvip [id] [level]");
        {
            PlayerInfo[id][pVIP] = level;
            if (id == INVALID_PLAYER_ID) { return SendClientMessage(playerid, -1, "No player online with that id."); }
        }
    }
    else SendClientMessage(playerid, -1,"You are not an Admin!");
    return 1;
}
==
Code:
 no motherfukin errors thank you so much man
__________________
Incorporated Roleplay
Its Here!

Needing:
Admins.
Leaders.
Helpers.
Roleplayer's

Private Message Me If You Are Interested
If I Have Ever Helped You Please Give Me A Reputation Point
DaRkAnGeL[NBK] is offline   Reply With Quote
Old 11/10/2011, 02:30 AM   #10
DaRkAnGeL[NBK]
Huge Clucker
 
DaRkAnGeL[NBK]'s Avatar
 
Join Date: Sep 2011
Location: Nottingham
Posts: 273
Reputation: 2
Default Re: GRRRRRRRR ZCMD wont work for me -.-

yet it didnt work in game -.-
__________________
Incorporated Roleplay
Its Here!

Needing:
Admins.
Leaders.
Helpers.
Roleplayer's

Private Message Me If You Are Interested
If I Have Ever Helped You Please Give Me A Reputation Point
DaRkAnGeL[NBK] is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
why wont this work ? [LHT]Bally Scripting Help 3 24/09/2011 10:11 PM
ZCMD wont detect my commands henry jiggy Scripting Help 23 06/09/2011 12:13 AM
why this wont work? the_zande Help Archive 5 30/04/2011 09:58 AM
Why wont this work? [MWR]Blood Help Archive 1 26/03/2011 05:15 PM
Why wont this work yarrum3 Help Archive 2 28/12/2010 08:27 PM


All times are GMT. The time now is 01:42 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.