/Gedit and /createpvehicle
#1

Hey I was wondering if anyone could help me with making these to cmds for my scripting
Reply
#2

and what you want they do ?
Reply
#3

Sorry I missed that part out haha Gedit to create objects in game like gates and make them movable and createpvehicle to make a player vehicle so they can keep it instead of buying a vehicle in strcmp
Reply
#4

Rep if it worked.

PHP код:
CMD:createpvehicle(playeridparams[])
{
// ur admin system here
    
new string[128], giveplayeridmodelidcolor1color2;
    if(
sscanf(params"uddd"giveplayeridmodelidcolor1color2)) return SendClientMessage(playeridCOLOR_WHITE"USAGE: /createpvehicle [playerid/partofname] [modelid] [color 1] [color 2]");
    if(
color1 || color1 255) { SendClientMessage(playeridCOLOR_GREY"   Color Number can't be below 0 or above 255!"); return 1; }
    if(
color2 || color2 255) { SendClientMessage(playeridCOLOR_GREY"   Color Number can't be below 0 or above 255!"); return 1; }
    if(
modelid 400 || modelid 611) { SendClientMessage(playeridCOLOR_GREY"   Vehicle Number can't be below 400 or above 611!"); return 1; }
    new 
playervehicleid GetPlayerFreeVehicleId(giveplayerid);
    new 
carsamount GetPlayerVehicleCount(giveplayerid);
    new 
Float:X,Float:Y,Float:Z;
    
GetPlayerPos(giveplayerid,X,Y,Z);
    new 
Float:Angle;
    
GetPlayerFacingAngle(giveplayerid,Angle);
    new 
car CreatePlayerVehicle(giveplayeridplayervehicleidmodelidXYZAnglecolor1color20);
    if(
car == INVALID_PLAYER_VEHICLE_ID)
    {
        
SendClientMessage(playeridCOLOR_GREY"ERROR: Something went wrong and the car didn't get created.");
    }
    else
    {
        
format(stringsizeof(string), " Vehicle successfully created with ID %d."car);
        
SendClientMessage(playeridCOLOR_GRAD1string);
    }
    return 
1;

Reply
#5

Quote:
Originally Posted by XBrianX
Посмотреть сообщение
Rep if it worked.

PHP код:
CMD:createpvehicle(playeridparams[])
{
// ur admin system here
    
new string[128], giveplayeridmodelidcolor1color2;
    if(
sscanf(params"uddd"giveplayeridmodelidcolor1color2)) return SendClientMessage(playeridCOLOR_WHITE"USAGE: /createpvehicle [playerid/partofname] [modelid] [color 1] [color 2]");
    if(
color1 || color1 255) { SendClientMessage(playeridCOLOR_GREY"   Color Number can't be below 0 or above 255!"); return 1; }
    if(
color2 || color2 255) { SendClientMessage(playeridCOLOR_GREY"   Color Number can't be below 0 or above 255!"); return 1; }
    if(
modelid 400 || modelid 611) { SendClientMessage(playeridCOLOR_GREY"   Vehicle Number can't be below 400 or above 611!"); return 1; }
    new 
playervehicleid GetPlayerFreeVehicleId(giveplayerid);
    new 
carsamount GetPlayerVehicleCount(giveplayerid);
    new 
Float:X,Float:Y,Float:Z;
    
GetPlayerPos(giveplayerid,X,Y,Z);
    new 
Float:Angle;
    
GetPlayerFacingAngle(giveplayerid,Angle);
    new 
car CreatePlayerVehicle(giveplayeridplayervehicleidmodelidXYZAnglecolor1color20);
    if(
car == INVALID_PLAYER_VEHICLE_ID)
    {
        
SendClientMessage(playeridCOLOR_GREY"ERROR: Something went wrong and the car didn't get created.");
    }
    else
    {
        
format(stringsizeof(string), " Vehicle successfully created with ID %d."car);
        
SendClientMessage(playeridCOLOR_GRAD1string);
    }
    return 
1;

I suppose "CreatePlayerVehicle" and "GetPlayerFreeVehicleID" functions are gonna create them self? How about you not copy/paste without a single clue on how stuff works?

@OP - What you're requesting are full dynamic systems, no one is gonna code a whole system just to post it here. There are alot of similar stuff that have been already released as filter scripts, check them out in the filterscripts section.

Here are some examples from a quick search:

http://forum.sa-mp.com/showthread.ph...t=dynamic+gate
http://forum.sa-mp.com/showthread.ph...Vehicle+System
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)