Phone System
#1

I tried to do a phone system, actually I've seen so many tutorial's but nothing helped me. First I scripted the /call, tested it and It works, now If Im not wrong to continue this system, I need /pickup and /hangup. Anyone who can give me a tip for that? Here is the /call

PHP код:
if(strcmp(cmd"/call"true) == 0) {
        if(
UserInfo[playerid][uPhone] == 1) {
            new 
string[200];
            new 
number;
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp)) {
                
SendClientMessage(playeridCOLOR_GREY"USAGE: /call [number]");
                return 
1;
            }
            
number strval(tmp);
            new 
pnumber UserInfo[playerid][uNumber];
            if(
UsingPhone[playerid] == 0) {
                
GetPlayerName(playeridpname24);
                
GiveNameSpace(pname);
                if(
Masked[playerid] == 1) {
                    
format(pnamesizeof(pname), "[Mask_%d_%d]"UserInfo[playerid][uID], RandMask[playerid]);
                }
                
format(stringsizeof(string), "* %s takes out a cellphone."pname);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
CallNumber(playeridnumberpnumber);
                
ApplyAnimation(playerid,"PED","phone_in",4.1,0,1,1,1,0);
                return 
1;
            }
            else {
                
SendClientMessage(playeridCOLOR_GREY"You are already making a call, use /hangup!");
                return 
1;
            }
        }
        else {
              
SendClientMessage(playeridCOLOR_LIGHTRED"You don't have a cellphone!");
             return 
1;
        } 
Reply
#2

Bump?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)