if (strcmp("/stealth", cmdtext, true, 5) == 0) { if(KillingSpree[playerid] < 3) return SendClientMessage(playerid,COLOR_YELLOW,"You Need A Kill Streak of 3 To Use Stealth Mode"); KillingSpree[playerid]-3; if(GetPVarInt(playerid,"CMDABUSE")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"You Can Only Use This Command every 30 seconds."); SetPVarInt(playerid,"CMDABUSE",GetTickCount()+30000); SetPlayerMarkerForPlayer( 100, 1, 0xFFFFFF00 ); SendClientMessage(playerid, COLOR_RED,"Type /stealthoff To Disabled Stealth Mode"); return 1; } if (strcmp("/stealthoff", cmdtext, true, 5) == 0) { if(KillingSpree[playerid] < 3) return SendClientMessage(playerid,COLOR_RED,"You Havn't Activated Stealth Mode Yet!"); KillingSpree[playerid]-3; if(GetPVarInt(playerid,"CMDABUSE")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"You Can Only Use This Command every 30 seconds."); SetPVarInt(playerid,"CMDABUSE",GetTickCount()+30000); SetPlayerMarkerForPlayer( 100, 1, COLOR_ORANGE ); SendClientMessage(playerid, COLOR_RED,"Stealth Mode Disabled"); return 1; }
I'v been trying to make a /stealth command if a player has a kill streak of 3
My problem is the stealth part, SetPlayerMarkerForPlayer( 100, 1, 0xFFFFFF00 ); hides the players icon, but when i i'm not sure on what would make there icon appear again when they type /stealthoff my code so far: Код:
if (strcmp("/stealth", cmdtext, true, 5) == 0) { if(KillingSpree[playerid] < 3) return SendClientMessage(playerid,COLOR_YELLOW,"You Need A Kill Streak of 3 To Use Stealth Mode"); KillingSpree[playerid]-3; if(GetPVarInt(playerid,"CMDABUSE")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"You Can Only Use This Command every 30 seconds."); SetPVarInt(playerid,"CMDABUSE",GetTickCount()+30000); SetPlayerMarkerForPlayer( 100, 1, 0xFFFFFF00 ); SendClientMessage(playerid, COLOR_RED,"Type /stealthoff To Disabled Stealth Mode"); return 1; } if (strcmp("/stealthoff", cmdtext, true, 5) == 0) { if(KillingSpree[playerid] < 3) return SendClientMessage(playerid,COLOR_RED,"You Havn't Activated Stealth Mode Yet!"); KillingSpree[playerid]-3; if(GetPVarInt(playerid,"CMDABUSE")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"You Can Only Use This Command every 30 seconds."); SetPVarInt(playerid,"CMDABUSE",GetTickCount()+30000); SetPlayerMarkerForPlayer( 100, 1, COLOR_ORANGE ); SendClientMessage(playerid, COLOR_RED,"Stealth Mode Disabled"); return 1; } |
if (strcmp("/stealthoff", cmdtext, true, 5) == 0) { if(KillingSpree[playerid] < 3) return SendClientMessage(playerid,COLOR_RED,"You Havn't Activated Stealth Mode Yet!"); KillingSpree[playerid]-3; if(GetPVarInt(playerid,"CMDABUSE")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"You Can Only Use This Command every 30 seconds."); SetPVarInt(playerid,"CMDABUSE",GetTickCount()+30000); SetPlayerMarkerForPlayer( 100, 1, COLOR_ORANGE ); SendClientMessage(playerid, 0xRRGGBBFF,"Stealth Mode Disabled"); return 1; }
Код:
if (strcmp("/stealthoff", cmdtext, true, 5) == 0) { if(KillingSpree[playerid] < 3) return SendClientMessage(playerid,COLOR_RED,"You Havn't Activated Stealth Mode Yet!"); KillingSpree[playerid]-3; if(GetPVarInt(playerid,"CMDABUSE")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"You Can Only Use This Command every 30 seconds."); SetPVarInt(playerid,"CMDABUSE",GetTickCount()+30000); SetPlayerMarkerForPlayer( 100, 1, COLOR_ORANGE ); SendClientMessage(playerid, 0xRRGGBBFF,"Stealth Mode Disabled"); return 1; } |
SetPlayerMarkerForPlayer( 100, 1, COLOR_ORANGE );
#include <foreach
foreach(Player, i)
SetPlayerMarkerForPlayer( i, playerid, COLOR_ORANGE );