Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new szString[128], pVeh, Float:vPos[4];
- CMD:buyplate( playerid, params[] ) //Using ZCMD.
- {
- if( isnull( params ) )
- return SendClientMessage( playerid, -1, "Syntax: /plate [plate(1-32 letters, car plate costs 50k)]" ); //If you are changing the plate price, change these two.
- if( strlen( params ) > 32 )
- return SendClientMessage( playerid, -1, "Syntax: /plate [plate(1-32 letters), car plate costs 50k]" ); //If you are changing the plate price, change these two.
- if( !IsPlayerInAnyVehicle( playerid ) )
- return SendClientMessage( playerid, -1, "Failed: You need to located in to your vehicle, car plate costs 50k" ); //If you are changing the plate price, change these two.
- pVeh = GetPlayerVehicleID( playerid );
- format( v_Plate[pVeh], 32, "%s", params );
- SetVehicleNumberPlate( pVeh, params );
- GetPlayerPos( playerid, vPos[0], vPos[1], vPos[2] );
- GetVehicleZAngle( pVeh, vPos[3] );
- SetVehicleToRespawn( pVeh );
- SetVehiclePos( pVeh, vPos[0], vPos[1], vPos[2] );
- SetVehicleZAngle( pVeh, vPos[3] );
- PutPlayerInVehicle( playerid, pVeh, 0 );
- GivePlayerMoney(playerid, -50000); //Remove this line if you want it for free. -Phantomz
- format( szString, 128, "Success: Your vehicle plate has succesfully changed to %s.", params );
- SendClientMessage( playerid, -1, szString );
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment