Please Paste some Commands for me, I am new in Scripting.
#1

I want some commands so only Admins can use it. Like.

/nominate <playerid> <level> (to make other player admin)
/freeze
/unfreeze
/freezeall
/unfreezeall
/goto
/getp <playerid> (to teleport someone to you)

P.S: I've register and login system already and also Admin System, Just I need it to help me with that commands.

Thanks!
Reply
#2

Why not do it yourself? Search on ****** how to create them, as in tutorials, and then use trial and error. Look at other scripts that have been released and see how they have done it.

You'll NEVER learn if we are doing everything for you, you've made 69 posts up to now, and I bet at least 90% of those are all in the scripting help topics where you want some help with your script.

As I said, make it yourself, or else you will never learn how to script. That's what I learnt. Whenever I was struggling to make a command when I was new to scripting, I'd go into other GM's and see how they did it, and try to manipulate that and make my own version of the command, and throughout that, I learnt how to use the functions, callbacks etc. correctly and now I am good enough at scripting to not even have to look through any other GM and just start from scratch.
Reply
#3

Man, I tried almost many and many times in finding many tutorials, I cant see videos in ******* because ******* is BLOCKED in our Country and when i find commands then I try to copy them but I always I got many, many errors and when I try to fix it, then 1 Errors solved and other create. That makes me really annoy.
Reply
#4

The reason why you get too many errors is because the variables in those cmds don't match yours.... You have to make the variables in the other commands you find on here to match your variables. That's all.
Reply
#5

Well then I don't think you should be creating a script from scratch, use an existing script, change some stuff around, edit the existing script and see how it goes. Add / remove commands to the existing script and it will get you to practice.

PS: It's almost impossible for us to help you if you don't provide your command processor and the variables that you generally use for admins, players, other users etc..
Reply
#6

Quote:
Originally Posted by Swyft™
View Post
The reason why you get too many errors is because the variables in those cmds don't match yours.... You have to make the variables in the other commands you find on here to match your variables. That's all.
That the same thing I am doing. Trying to create own commands by seeing tutorials but It is creating many ERRORS.
Removing them and atlast at the End, I've to remove the whole command to run the Gamemode. That's my Life
Reply
#7

You didn't exactly read my comment.
Reply
#8

To your previous thread, you asked for the 4 commands of the list and you got them.

Quote:
Originally Posted by tyler12
View Post
pawn Code:
CMD:freeze(playerid,params[])
{
    new id;
    if(sscanf(params,"u",id)) return SendClientMessage(playerid,-1,"USAGE: /freeze [playerid]");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"ERROR: Invalid playerid");
    TogglePlayerControllable(id,0);
    GameTextForPlayer(id,"~r~frozen",4000,4);
    return 1;
}

CMD:unfreeze(playerid,params[])
{
    new id;
    if(sscanf(params,"u",id)) return SendClientMessage(playerid,-1,"USAGE: /unfreeze [playerid]");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"ERROR: Invalid playerid");
    TogglePlayerControllable(id,1);
    GameTextForPlayer(id,"~r~unfrozen",4000,4);
    return 1;
}

CMD:unfreezeall(playerid,params[])
{
    foreach(new i:Player)
    {
        TogglePlayerControllable(i,1);
        GameTextForPlayer(i,"~r~unfrozen",4000,4);
    }
    return 1;
}

CMD:freezeall(playerid,params[])
{
    foreach(new i:Player)
    {
        TogglePlayerControllable(i,0);
        GameTextForPlayer(i,"~r~frozen",4000,4);
    }
    return 1;
}
Don't forget to include foreach and zcmd.
But you ask them again without even trying to find why is that? Or even replace foreach to for loop.

DanishHaq is correct, plus it's scripting help section. You script something, you get errors - we help you to fix them.

This is NOT SCRIPT REQUEST section.
Reply
#9

Quote:
Originally Posted by Konstantinos
View Post
To your previous thread, you asked for the 4 commands of the list and you got them.



But you ask them again without even trying to find why is that? Or even replace foreach to for loop.

DanishHaq is correct, plus it's scripting help section. You script something, you get errors - we help you to fix them.

This is NOT SCRIPT REQUEST section.
I got same errors which I got before but you didn't reply me on that post that's why I asked again.

pawn Code:
E:\SCRIPT\gamemodes\Gamemode.pwn(1326) : error 017: undefined symbol "foreach"
E:\SCRIPT\gamemodes\Gamemode.pwn(1326) : error 029: invalid expression, assumed zero
E:\SCRIPT\gamemodes\Gamemode.pwn(1326) : error 017: undefined symbol "Player"
E:\SCRIPT\gamemodes\Gamemode.pwn(1326) : 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.
And the Line 1326 is:
pawn Code:
foreach(new i:Player)
Reply
#10

Quote:
Originally Posted by MAFIAWARS
View Post
I got same errors which I got before but you didn't reply me on that post that's why I asked again.

pawn Code:
E:\SCRIPT\gamemodes\Gamemode.pwn(1326) : error 017: undefined symbol "foreach"
E:\SCRIPT\gamemodes\Gamemode.pwn(1326) : error 029: invalid expression, assumed zero
E:\SCRIPT\gamemodes\Gamemode.pwn(1326) : error 017: undefined symbol "Player"
E:\SCRIPT\gamemodes\Gamemode.pwn(1326) : 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.
And the Line 1326 is:
pawn Code:
foreach(new i:Player)
Make sure you've got the latest version of foreach, and make sure you have #include <foreach> at the top of the script. I'm not use to foreach, nor do I know if it will make a difference or not, but change foreach(new i:Player) to foreach(new i:Playerid)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)