A few scripting requests
#1

Script List

x Score system to go by hours. (Every hour the user will get 1 score.)
x A fix command to let admins fix there vehicles for admins only. (/afix

I am currently using Vortex Roleplay script, so please use ZCMD. thank you


I could also use a perm. scripter. The server is 24/7 so it'll always be on, (Might be tight this month) so if you can script add me on MSN, Azzeto@live.com DO NOT ADD ME IF YOU CAN NOT SCRIPT WITH ZCMD!
Reply
#2

Quote:
Originally Posted by R3G1ST3R
Посмотреть сообщение
Script List

x Score system to go by hours. (Every hour the user will get 1 score.)
I think it will work:

PHP код:
new time;
forward Check();
public 
OnGameModeInit()
{
    new 
h;
    
SetTimer("Check"30000,true);
    
gettime(h);
    
time h;
    return 
1;
}
public 
Check()
{
    new 
hm;
    
gettime(h,m);
    if((
== tempo+|| == 23) && == 0)
    {
        for(new 
0MAX_PLAYERS++) { SetPlayerScore(iGetPlayerScore(i) + 1); }    
    }
    else { 
tempo h; }
    return 
1;

Quote:
Originally Posted by R3G1ST3R
Посмотреть сообщение
x A fix command to let admins fix there vehicles for admins only. (/afix

I am currently using Vortex Roleplay script, so please use ZCMD. thank you

I could also use a perm. scripter. The server is 24/7 so it'll always be on, (Might be tight this month) so if you can script add me on MSN, Azzeto@live.com DO NOT ADD ME IF YOU CAN NOT SCRIPT WITH ZCMD!
PHP код:
CMD:afix(playeridparams[])
{
    
#pragma unused params
    
if(!IsPlayerAdmin(playerid))
        return 
SendClientMessage(playerid0xFF0000FF"You aren't a RCON Admin.");
    if(!
IsPlayerInAnyVehicle(playerid))
        return 
SendClientMessage(playerid0xFF0000FF"You must be in a vehicle to use this command.");
    
RepairVehicle(GetPlayerVehicleID(playerid));
    return 
1;

Remark: Change IsPlayerAdmin for your admin variable.
Reply
#3

6 warnings with the score thing,

Код:
C:\Documents and Settings\Jeremy\Desktop\Vortex\gamemodes\VortexRoleplay.pwn(764) : warning 217: loose indentation
C:\Documents and Settings\Jeremy\Desktop\Vortex\gamemodes\VortexRoleplay.pwn(765) : warning 217: loose indentation
C:\Documents and Settings\Jeremy\Desktop\Vortex\gamemodes\VortexRoleplay.pwn(782) : warning 225: unreachable code
C:\Documents and Settings\Jeremy\Desktop\Vortex\gamemodes\VortexRoleplay.pwn(11607) : warning 219: local variable "time" shadows a variable at a preceding level
C:\Documents and Settings\Jeremy\Desktop\Vortex\gamemodes\VortexRoleplay.pwn(14078) : warning 219: local variable "time" shadows a variable at a preceding level
C:\Documents and Settings\Jeremy\Desktop\Vortex\gamemodes\VortexRoleplay.pwn(767) : warning 204: symbol is assigned a value that is never used: "time"
Can you help with that?
Reply
#4

pawn Код:
new time1;

forward Check();

public OnGameModeInit()
{
    new h;
    SetTimer("Check", 30000,true);
    gettime(h);
    time1 = h;
}
public Check()
{
    new h, m;
    gettime(h,m);
    if((h == tempo+1 || h == 23) && m == 0)
    {
        for(new i = 0; i < MAX_PLAYERS; i ++) { SetPlayerScore(i, GetPlayerScore(i) + 1); }
    }
    else { tempo = h; }
    return 1;
}
Reply
#5

I'm a complete noob to scripting, but im trying to get the basics on the VXRP script, could you explain where I put all that stuff?
Reply
#6

pawn Код:
new time1;//On top of your script

forward Check();//On top of your script

public OnGameModeInit()//You know where it is.
{
    new h;
    SetTimer("Check", 30000,true);
    gettime(h);
    time1 = h;
}
public Check()//Somewhere in your script.
{
    new h, m;
    gettime(h,m);
    if((h == tempo+1 || h == 23) && m == 0)
    {
        for(new i = 0; i < MAX_PLAYERS; i ++) { SetPlayerScore(i, GetPlayerScore(i) + 1); }
    }
    else { tempo = h; }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)