Script Request Thread #5

Quote:
Originally Posted by Affan
View Post
Sorry for posting twice but could you please make me a zcmd or another fomat like dcmd command?
I want it to be like a spawning guns. For example /getgun minigun , /getgun ak 47
I don't use ZCMD, but I did this myself. If you have any errors, send them my way and I'll fix em.
Proper usage: /givegun PlayerID GunID Ammo - (Minigun is "38")
pawn Code:
CMD:givegun(playerid,params[])
{
    new PID; //Player ID
    new GunID; //Gun ID
    new Ammo; //Ammo #
    if(PlayerInfo[playerid][pAdmin] <= 3) return SendClientMessage(playerid,-1,"{FF0000}__**ERROR**__ {FFFFFF}You cannot use this command");// Admins below level 3 will not be able to use this command.
    if(sscanf(params, "ui", PID, GUNID, Ammo)) return SendClientMessage(playerid,-1,"{FF0000}__**ERROR**__ {FFFFFF}Usage: /givegun <playerid> <gunid> <ammo>");
    if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, -1,"{FF0000}__**ERROR**__ {FFFFFF}That player is not connected to the server!");
    GivePlayerWeapon(PID, GunID, Ammo); //Command to give weapons.
    return 1;
}
Reply

Quote:
Originally Posted by InActtive™
View Post
I don't use ZCMD, but I did this myself. If you have any errors, send them my way and I'll fix em.
Proper usage: /givegun PlayerID GunID Ammo - (Minigun is "38")
pawn Code:
CMD:givegun(playerid,params[])
{
    new PID; //Player ID
    new GunID; //Gun ID
    new Ammo; //Ammo #
    if(PlayerInfo[playerid][pAdmin] <= 3) return SendClientMessage(playerid,-1,"{FF0000}__**ERROR**__ {FFFFFF}You cannot use this command");// Admins below level 3 will not be able to use this command.
    if(sscanf(params, "ui", PID, GUNID, Ammo)) return SendClientMessage(playerid,-1,"{FF0000}__**ERROR**__ {FFFFFF}Usage: /givegun <playerid> <gunid> <ammo>");
    if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, -1,"{FF0000}__**ERROR**__ {FFFFFF}That player is not connected to the server!");
    GivePlayerWeapon(PID, GunID, Ammo); //Command to give weapons.
    return 1;
}
Thanks but an error came

pawn Code:
:\Users\Administrator\Desktop\XFreedom V.0.1\filterscripts\isaid.pwn(20) : error 017: undefined symbol "PlayerInfo"
C:\Users\Administrator\Desktop\XFreedom V.0.1\filterscripts\isaid.pwn(20) : warning 215: expression has no effect
C:\Users\Administrator\Desktop\XFreedom V.0.1\filterscripts\isaid.pwn(20) : error 001: expected token: ";", but found "]"
C:\Users\Administrator\Desktop\XFreedom V.0.1\filterscripts\isaid.pwn(20) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Desktop\XFreedom V.0.1\filterscripts\isaid.pwn(20) : 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.
Line 20:

pawn Code:
if(PlayerInfo[playerid][pAdmin] <= 3) return SendClientMessage(playerid,-1,"{FF0000}__**ERROR**__ {FFFFFF}You cannot use this command");// Admins below level 3 will not be able to use this command.
Reply

Quote:
Originally Posted by Affan
View Post
Thanks but an error came

pawn Code:
:\Users\Administrator\Desktop\XFreedom V.0.1\filterscripts\isaid.pwn(20) : error 017: undefined symbol "PlayerInfo"
C:\Users\Administrator\Desktop\XFreedom V.0.1\filterscripts\isaid.pwn(20) : warning 215: expression has no effect
C:\Users\Administrator\Desktop\XFreedom V.0.1\filterscripts\isaid.pwn(20) : error 001: expected token: ";", but found "]"
C:\Users\Administrator\Desktop\XFreedom V.0.1\filterscripts\isaid.pwn(20) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Desktop\XFreedom V.0.1\filterscripts\isaid.pwn(20) : 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.
Line 20:

pawn Code:
if(PlayerInfo[playerid][pAdmin] <= 3) return SendClientMessage(playerid,-1,"{FF0000}__**ERROR**__ {FFFFFF}You cannot use this command");// Admins below level 3 will not be able to use this command.
Your PlayerInfo isn't defined? Huh? Try Pinfo or pInfo or something. How else do you find your PlayerInfo? How do you restrict certain commands from non-admin players?
Reply

Yes thank you Southclaw, I'll try to do that in the future.
Anyways can someone give me a command to do /unabn like CMD: unabn or dcmd_unbann thanks
Reply

@claw
pawn Code:
CMD:ban(playerid, params[])
    {
        if(PlayerInfo[playerid][pAdmin] >= 3) {
            new PID; //define the playerid we wanna ban
            new reason[64]; //the reason, put into a string
            new str[128]; //a new message string
            new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME]; //defines the function with the playername we wanna get
            GetPlayerName(playerid, Adminname, sizeof(Adminname)); //defines the function with the adminname we wanna get
            GetPlayerName(PID, Playername, sizeof(Playername));
            if(sscanf(params, "us[64]", PID,reason)) return SendClientMessage(playerid, COLOR_DARKGREY, "USAGE: /kick [playerid] [reason]"); //tell sscanf if the parameters/the syntax is written wrong to return a message (PID and the reason used here)

            if(!IsPlayerConnected(PID)) // if the ID is wrong or not connected, return a message! (PID used here)
                return SendClientMessage(playerid, COLOR_DARKGREY, "Player is not connected!");

            format(str, sizeof(str), "'%s' has been banned by administrator '%s'. Reason: %s ", Playername, Adminname, reason); //format the string we've defined to send the message, playername and adminname are used to receive the information about the names
        SendClientMessageToAll(COLOR_BRIGHTRED, str); //send that message to all
        Ban(PID); //Ban the playerid we've defined

        }
        else //if he has not got the permissions
        {
            SendClientMessage(playerid, COLOR_DARKGREY, "You have to be level 5 to use that command!"); //return this message
        }
        return 1;
    }
Reply

Hello, i need these includes please and by the way, i searched for them here on SA-MP forums and searched for it on ****** but i didn't find anything
pawn Code:
#include <seifader>
#include <Load>
#include <seif_text>
#include <Double-O-Objects>
#include <bodyparts>
and thanks
Reply

Hi, could someone give me a command to do /admins and i can see the admins which are online it'll be good if its like CMD:Admins or something like that.
Reply

Hello I was wondering if someone could help me replicate this kind of stats.

If you think you can do It please PM me.
Reply

i new to samp and i run my own server.
(i just play with my friends)
is there a way to get NPC's in the server like in single player. (walking and driving around).
if yes how?
maybe cops and stuff?

plz let me know!
Reply

Quote:
Originally Posted by hiddebas
View Post
i new to samp and i run my own server.
(i just play with my friends)
is there a way to get NPC's in the server like in single player. (walking and driving around).
if yes how?
maybe cops and stuff?

plz let me know!
Not quite what you want, as exactly what you want is not possible. https://sampforum.blast.hk/showthread.php?tid=95034
Reply

Hi,Someone got a Weather? the Weather goes to rain and sunny like all that weather stuff.if you do plz post it here.
Reply

You are thinking like command or what? Because it changes automaticly in samp!
Reply

it go by it self
Reply

Quote:
Originally Posted by Hade.
View Post
Hey, can someone help me with a /word command? So that If you type /world you will be like in you own world, and wont see other players or cars, also i need a /inviteworld /normalword. /inviteword to inivite someone to your world and /normalword to go back to the same world with others.
Anyone?
Reply

Quote:
Originally Posted by Hade.
View Post
Anyone?
Here is tutorial about wirtual worlds!
Reply

Quote:
Originally Posted by Hade.
View Post
Anyone?
pawn Code:
CMD:world(playerid, params[])
{
    if(GetPVarInt(playerid, "VirtualWorld") > 0)
        return SendClientMessage(playerid, -1, "You are already in a separate world. Use /normalworld.");
    new vworld = random(99999), str[40];
    SetPlayerVirtualWorld(playerid, vworld);
    SetPVarInt(playerid, "VirtualWorld", vworld);
    format(str, sizeof str, "You are now in virtual world %d.", vWorld);
    SendClientMessage(playerid, -1,str);
    return 1;
}
CMD:normalworld(playerid, params[])
{
    if(GetPVarInt(playerid, "VirtualWorld") == 0)
        return SendClientMessage(playerid, -1, "You're not in a separate world. Use /world first.");

    DeletePVar(playerid, "VirtualWorld");
    SetPlayerVirtualWorld(playerid, 0);
    SendClientMessage(playerid, -1, "You're now back in the normal world.");
    return 1;
}
CMD:inviteworld(playerid, params[])
{
    new pID, vworld, str[80];
    if(GetPVarInt(playerid, "VirtualWorld") == 0)
        return SendClientMessage(playerid, -1, "You're not in a separate world, use /world first.");
    if(sscanf(params,"u",pID))
        return SendClientMessage(playerid,-1,"USAGE: /inviteworld [PlayerID]");

    if(!IsPlayerConnected(pID))
        return SendClientMessage(playerid, -1, "ERROR: Selected player is not connected.");

    vworld = GetPVarInt(playerid, "VirtualWorld");
    SetPVarInt(pID, "WorldInvite", vworld);
    format(str, sizeof str, "You've been invited in world %i by someone. Type /accept to join the world.", vworld);
    SendClientMessage(pID, -1, str);
    format(str, sizeof str, "You invited selected player in world %i.", vworld);
    SendClientMessage(playerid, -1, str);
    return 1;
}
CMD:accept(playerid, params[])
{
    if(GetPVarInt(playerid, "WorldInvite") < 1)
        return SendClientMessage(playerid, -1, "Noone invited you in a separate world.");

    new vworld = GetPVarInt(playerid, "WorldInvite");
    new str[80];
    SetPlayerVirtualWorld(playerid, vworld);
    SetPVarInt(playerid, "VirtualWorld", vworld);
    format(str, sizeof str, "You accepted to join world %i.", vworld);
    SendClientMessage(playerid, -1, str);
    DeletePVar(playerid, "WorldInvite");
    return 1;
}
This should help you or at least give you a clue, where to start from or how to make it. Hope it helped !
Reply

Quote:
Originally Posted by DerickClark
View Post
Hi,Someone got a Weather? the Weather goes to rain and sunny like all that weather stuff.if you do plz post it here.
This is how you should do it. Now, the weather will change every minute, just so you can test it. You can change '60' with how many seconds you want.
pawn Code:
public OnGameModeInit()
{
    SetTimer("WeatherChange", 60 * 1000, true);
    return 1;
}

forward WeatherChange();
public WeatherChange()
{
    new weather = random(45);
    SetWeather(weather);
    new str[40];
    format(str, sizeof str, "Weather changed to %i.", weather);
    SendClientMessageToAll(-1, str);
    return 1;
}
Reply

Hello guys, I want a script that makes for each gang a safe so it'll be able to store materials and pot and crack and guns
Reply

guys i need helper system with this hcmd

/sethelper [id] /unsethelper [id] kick warn afk [TEXT] /helpers to see online helpers
Reply

please i need something easy....
i need if players was DMING
like that
Player X Weapon Player Y >>>> like that


please please please make it i need it fast...
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)