10.07.2013, 02:18
(
Последний раз редактировалось XxXBr0nXxX; 10.07.2013 в 07:17.
)
Код:
#include <a_samp> #define COLOR_ORANGE 0xFF9900AA #define COLOR_GREEN 0x33AA33AA //speedboost new att[MAX_PLAYERS]; new Text:Textdraw0;
Код:
Textdraw0 = TextDrawCreate(127.000000, 417.000000, "SPEEDBOOST ENBLED"); TextDrawBackgroundColor(Textdraw0, 255); TextDrawFont(Textdraw0, 1); TextDrawLetterSize(Textdraw0, 0.390000, 1.200000); TextDrawColor(Textdraw0, -16711681); TextDrawSetOutline(Textdraw0, 1); TextDrawSetProportional(Textdraw0, 0);
Код:
att[playerid] = false; TextDrawHideForPlayer(playerid,Textdraw0);
Код:
if (strcmp(cmdtext,"/speed", true) == 0) { if(att[playerid]) { if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_ORANGE,"You aren't in a car."); att[playerid] = false; SendClientMessage(playerid, COLOR_GREEN, "You have disabled speedboost. Type /speed to enable it."); TextDrawHideForPlayer(playerid,Textdraw0); } else { if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_ORANGE,"You aren't in a car."); att[playerid] = true; SendClientMessage(playerid, COLOR_GREEN, "You have enabled speedbost. Type /speed to disable it."); TextDrawShowForPlayer(playerid,Textdraw0); } return 1; } return 0; }
Код:
if( att[playerid] == 1) { TextDrawShowForPlayer(playerid,Textdraw0); SendClientMessage(playerid, COLOR_ORANGE, "Type /speed to enable or disable speedbost."); } SendClientMessage(playerid, COLOR_ORANGE, "Type /speed to enable or disable speedbost."); return 1; }
Код:
if( att[playerid] == 1) { TextDrawHideForPlayer(playerid,Textdraw0); } return 1; }
Код:
if( att[playerid] == 0) return 0; if(newkeys & KEY_FIRE && IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { new Float:x, Float:y, Float:z; GetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z); SetVehicleVelocity(GetPlayerVehicleID(playerid), x * 3, y * 3, z * 3); } } return 1; }
sp.amx