30.11.2011, 15:05
(
Последний раз редактировалось Tasos_Killer; 30.11.2011 в 16:08.
)
Hello everyone! I wanna make commands for my new edited class of my server and i need some help!
First of all the GM i have is SFCRRPG
so this is i need;
this command that hides the player from the radar to make it available only for my own class...how could i do this and add it available on my class and only for my class?? an example the gm has is this
First of all the GM i have is SFCRRPG
so this is i need;
Код:
SetPlayerMarkerForPlayer( 42, 1, ( GetPlayerColor( 1 ) | 0x000000FF ) );
Код:
dcmd_tackle(playerid,params[]) { new string[128]; new ID; if(sscanf(params, "u", ID)) { SendClientMessage(playerid,COLOR_ERROR,"USAGE: /tackle (Player Name/ID)"); return 1; } if(IsSpawned[playerid] != 1) { SendClientMessage(playerid,COLOR_ERROR,"You must be alive and spawned in order to be able to use this command."); return 1; } if(IsFrozen[playerid] == 1) { SendClientMessage(playerid,COLOR_ERROR,"You have been frozen by a Server Administrator. You cannot use this command."); return 1; } if(IsKidnapped[playerid] == 1) { SendClientMessage(playerid,COLOR_ERROR,"You are kidnapped. You cannot use this command."); return 1; } if(gTeam[playerid] != TEAM_CIA) { SendClientMessage(playerid,COLOR_ERROR,"Only CIA Personnel can tackle players."); return 1; } if(!IsPlayerConnected(ID)) { format(string,sizeof(string),"The player ID (%d) is not connected to the server. You cannot tackle them",ID); SendClientMessage(playerid,COLOR_ERROR,string); return 1; } if(GetDistanceBetweenPlayers(playerid,ID) > 4) { format(string,sizeof(string),"%s(%d) is too far away. You cannot reach him to tackle him.",PlayerName(ID),ID); SendClientMessage(playerid,COLOR_ERROR,string); return 1; } if(gTeam[ID] == TEAM_COP || gTeam[ID] == TEAM_ARMY || gTeam[ID] == TEAM_CIA) { SendClientMessage(playerid,COLOR_ERROR,"You cannot tackle other Law Enforcement officers. You might lose your job for that .."); return 1; } if(IsTackled[ID] >= 1) { format(string,sizeof(string),"%s(%d) is already tackled. You should place handcuffs on them with /cuff (Player Name/ID).",PlayerName(ID),ID); SendClientMessage(playerid,COLOR_ERROR,string); return 1; } if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) { SendClientMessage(playerid,COLOR_ERROR,"You cannot place a tackle a suspect while in a vehicle. Exit the vehicle first."); return 1; } if(GetPlayerState(ID) == PLAYER_STATE_DRIVER || GetPlayerState(ID) == PLAYER_STATE_PASSENGER) { SendClientMessage(playerid,COLOR_ERROR,"You cannot tackle a suspect while they are in a vehicle. Get them to exit the vehicle first."); return 1; } if(playerid == ID) { SendClientMessage(playerid,COLOR_ERROR,"You cannot tackle yourself, how could that even be possible?"); return 1; } if(IsSpawned[ID] != 1) { format(string,sizeof(string),"%s(%d) is not spawned. You cannot place tackle dead people ..",PlayerName(ID),ID); SendClientMessage(playerid,COLOR_ERROR,string); return 1; } if(IsFrozen[ID] == 1) { format(string,sizeof(string),"%s(%d) is frozen by a Server Administrator. You cannot tackle them.",PlayerName(ID),ID); SendClientMessage(playerid,COLOR_ERROR,string); return 1; } if(AttemptedToTackleRecently[playerid] >= 1) { SendClientMessage(playerid,COLOR_ERROR,"You are tired out from your last attempt. Please wait until you get your energy back first."); return 1; } new crand = random(100); if(crand <= 30) { SendClientMessage(playerid,COLOR_ERROR,"Tackle attempt failed. The suspect slipped out of your grasp."); AttemptedToTackleRecently[playerid] =25; return 1; } if(GetDistanceBetweenPlayers(playerid,ID) <= 4 && crand > 30) { SendClientMessage(playerid,COLOR_DEADCONNECT,"[[_Suspect Tackled_]]"); format(string,sizeof(string),"You have tackles %s(%d) to the ground! They can not move for 5 seconds.",PlayerName(ID),ID); SendClientMessage(playerid,COLOR_LIGHTBLUE,string) ; SendClientMessage(ID,COLOR_DEADCONNECT,"[[_Tackled to the ground_]]"); format(string,sizeof(string),"CIA Officer %s(%d) has tackled you to the ground! You cannot move!",PlayerName(playerid),playerid); ApplyAnimation(playerid,"PED","EV_dive",4.0,0,0,0, 0,0); TogglePlayerControllable(ID,0); ApplyAnimation(ID, "ped", "BIKE_fall_off", 3.0, 0, 0, 0, 0, 0); // Fallen off bike IsTackled[ID] =7; return 1; } return 1;