SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 16/05/2018, 05:46 PM   #1
BanhVo
Big Clucker
 
Join Date: Sep 2017
Posts: 98
Reputation: 15
Default Help me

I code this code for Cops in my server. And I do not know how to make this code a part. As I typed this command it will appear on the [Fatty Key and it will automatically load [5, 4, 3, 2, 1] . It is the same as when you type the [server maintenance] command, it will show the letters and numbers.
PHP Code:
CMD:ffind(playeridparams[])
    {
        if(
PlayerInfo[playerid][pDuty] && IsACop(playerid))
    {
        
//SendClientMessageEx(playerid, COLOR_RED, "* Listing all gates within 5 meters of you...");
        
for(new iFloatfGatePos[3], gateidstring[128], szMessage[32]; MAX_GATESi++)
        {
            if(
sscanf(params"i"gateid))
            
GetDynamicObjectPos(GateInfo[i][gGATE], fGatePos[0], fGatePos[1], fGatePos[2]);
            if(
IsPlayerInRangeOfPoint(playerid5fGatePos[0], fGatePos[1], fGatePos[2]))
            {
                if(
GateInfo[i][gModel] != 0)
                {
                    
//format(szMessage, sizeof(szMessage), "Gate ID %d (VW: %d)", i, GateInfo[i][gVW]);
                    
SendClientMessageEx(playeridCOLOR_WHITEszMessage);
                    
//format(string,sizeof(string),"|___________ Password Gate (ID: %d) ___________|", gateid);
                    //format(string, sizeof(string), "PassWord Gate: %s", GateInfo[i][gPass]);
                    
SendClientMessageEx(playeridCOLOR_WHITEstring);

                }
            }
        }
    }
    else
    {
        
SendClientMessageEx(playeridCOLOR_GRAD2"Ban khong phai la nhan vien nha nuoc.");
    }
    return 
1;

__________________
My job
Study map editing at Forum.sa-mp.com
Development of maps for SAMP Vietnamese
BanhVo is offline   Reply With Quote
Old 17/05/2018, 04:40 AM   #2
GTLS
Gangsta
 
GTLS's Avatar
 
Join Date: Aug 2014
Location: India
Posts: 825
Reputation: 91
Default Re: Help me

You mean you want a countdown to be shown?
PHP Code:
new 1str[5];
while(
i<6)
{
   
format(strsizeof(str), "%d"i);
   
SendClientMessage(playerid, -1str); 
   
i++;

__________________

I don't help for rep. I help cuz I was helped in the past.


California State Roleplay - X Update Now under beta testing phase. Stay Tuned.
GTLS is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 09:20 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.