/Gedit and /createpvehicle
#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


Messages In This Thread
/Gedit and /createpvehicle - by CSLangdale - 17.02.2016, 22:28
Re: /Gedit and /createpvehicle - by ikey07 - 17.02.2016, 22:51
Re: /Gedit and /createpvehicle - by CSLangdale - 17.02.2016, 23:32
Re: /Gedit and /createpvehicle - by XBrianX - 18.02.2016, 02:24
Re: /Gedit and /createpvehicle - by -CaRRoT - 18.02.2016, 03:25

Forum Jump:


Users browsing this thread: 1 Guest(s)