16.07.2018, 21:24
Problem I am having a minor issue with a simple function, I created this function to: 1) check the PlayerInfo to see if the player's PhoneNumber is >1 thus printing to the function N/A. Else if the player has a phone number the function prints that number. The function is not printing or showing if the player doesnot have a number.
how i plan on calling this function.
new istr;
format(istr, sizeof(istr), "%s %s" , RPNAME(playerid), GetPlayerPhoneExist(playerid)
SendClientmessage(playerid, COLOR_RED, istr);
please assist.
Код:
stock PlayerPhoneExist(playerid) { if(PlayerInfo[playerid][phonenumber]<1) { format(iStr,sizeof(iStr),"I/A"); print(iStr); } else { format(iStr,sizeof(iStr),"%d", PlayerInfo[playerid][phonenumber]); print(iStr); } return 1; }
new istr;
format(istr, sizeof(istr), "%s %s" , RPNAME(playerid), GetPlayerPhoneExist(playerid)
SendClientmessage(playerid, COLOR_RED, istr);
please assist.