SQLite based cell phone system with fully functional contact and messaging systems.
Link: https://youtu.be/VlGSOE9n5To
Download & move 'cellphones.inc' into your includes folder.
GetPlayerPhone(playerid); // Check if the player has a cell phone.
GivePlayerPhone(playerid); // Give the player a cell phone.
RemovePlayerPhone(playerid); // Remove the player's cell phone.
ShowPlayerPhone(playerid); // Show the player their cell phone.
#include <a_samp>
#include <cellphones>
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp("/givephone", cmdtext, true))
{
if(GetPlayerPhone(playerid)) return SendClientMessage(playerid, -1, "SERVER: You already have a phone.");
GivePlayerPhone(playerid);
return 1;
}
else if(!strcmp("/removephone", cmdtext, true))
{
if(!GetPlayerPhone(playerid)) return SendClientMessage(playerid, -1, "SERVER: You don't have a phone.");
RemovePlayerPhone(playerid);
return 1;
}
else if(!strcmp("/showphone", cmdtext, true))
{
if(!GetPlayerPhone(playerid)) return SendClientMessage(playerid, -1, "SERVER: You don't have a phone.");
ShowPlayerPhone(playerid);
return 1;
}
return 0;
}