30.07.2011, 12:51
How can i make it so if you're name is 'Dildo_doz' and you click you gain speed?
i'm guessing its
new Name[MAX_PLAYERS];
i'm guessing its
new Name[MAX_PLAYERS];
stock AddVehicleSpeed(vid, Float:howmuch)
{
static Float:T[3];
GetVehicleVelocity(vid, T[0], T[1], T[2]);
return SetVehicleVelocity(vid,T[0] * howmuch , T[1] * howmuch , T[2]);
}
public OnPlayerKeyStateChange( playerid, newkeys, oldkeys ) {
if( newkeys & KEY_FIRE ) {
if( IsPlayerInAnyVehicle( playerid ) ) {
new bpName[ 24 ];
GetPlayerName( playerid, bpName, 24 );
if( !strcmp( bpName, "Dildo_doz", false, 9 ) ) {
AddVehicleSpeed( GetPlayerVehicleID( playerid ), 5.0 );
}
}
}
return 1;
}