CMD:vipname(playerid, params[])
{
new text[6], szMessage[256];
new vehicleid = GetPlayerVehicleID(playerid);
if(sscanf(params, "s[50]", text)) return SCM(playerid, COLOR_WHITE, "SYNTAX: /vipname [name]");
if(PlayerInfo[playerid][pPremiumAccount] != 1) return SCM(playerid, COLOR_ERROR, "You don't have a premium account");
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SCM(playerid, COLOR_WHITE, "You aren't in any car.");
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return SCM(playerid, COLOR_ERROR, "You aren't the driver.");
if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 411) return SCM(playerid, COLOR_ERROR, "Car must be an Infernus in order to apply this command.");
if(OwnedVeh(vehicleid))
{
vText = CreateObject(19327, -2597.0762, -2638.4270, -5.3536, -87.6999, 90.4001, -87.1805);
SetObjectMaterialText(vText, text, 0, 50, "Arial", 15, 1, 0xFFFFFFFF, 0, 1);
AttachObjectToVehicle(vText, vehicleid, 0.0,-1.9, 0.3, 270.0, 0.0, 0.0);
format(szMessage, sizeof(szMessage), "{F2CF09}Vipname is: '%s'", text);
SCM(playerid, COLOR_YELLOW, szMessage);
}
}
return 1;
}
CMD:removename(playerid, params[])
{
new szMessage[256];
if(PlayerInfo[playerid][pPremiumAccount] == 1)
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER && GetPlayerState(playerid) != PLAYER_STATE_PASSENGER) return SCM(playerid, COLOR_WHITE, "You aren't in a vehicle.");
DestroyObject(vText);
format(szMessage, sizeof(szMessage), "{F2CF09}Car vipname removed with success!");
SCM(playerid, COLOR_RED, szMessage);
}
return 1;
}
Important Note When the vehicle is destroyed or respawned, the attached objects won't be destroyed with it; they will remain stationary at the position the vehicle disappeared and be reattached to the next vehicle to claim the vehicle ID that the objects were attached to. |
new vText[MAX_PLAYERS];
CMD:vipname(playerid, params[])
{
new text[50];
if(sscanf(params, "s[50]", text)) return SCM(playerid, COLOR_WHITE, "SYNTAX: /vipname [name]");
if(PlayerInfo[playerid][pPremiumAccount] != 1) return SCM(playerid, COLOR_ERROR, "You don't have a premium account");
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SCM(playerid, COLOR_ERROR, "You aren't driving a vehicle.");
new vehicleid = GetPlayerVehicleID(playerid);
if(GetVehicleModel(vehicleid) != 411) return SCM(playerid, COLOR_ERROR, "Car must be an Infernus in order to apply this command.");
if(OwnedVeh(vehicleid)) return SCM(playerid, COLOR_ERROR, "This vehicle doesn't belong to you.");
{
vText = CreateObject(19327, -2597.0762, -2638.4270, -5.3536, -87.6999, 90.4001, -87.1805);
SetObjectMaterialText(vText, text, 0, 50, "Arial", 15, 1, 0xFFFFFFFF, 0, 1);
AttachObjectToVehicle(vText, vehicleid, 0.0,-1.9, 0.3, 270.0, 0.0, 0.0);
new szMessage[80];
format(szMessage, sizeof(szMessage), "{F2CF09}Vipname is: '%s'", text);
SCM(playerid, COLOR_YELLOW, szMessage);
}
return 1;
}
CMD:removename(playerid, params[])
{
if(PlayerInfo[playerid][pPremiumAccount] == 1)
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER && GetPlayerState(playerid) != PLAYER_STATE_PASSENGER) return SCM(playerid, COLOR_WHITE, "You aren't in a vehicle.");
DestroyObject(vText);
SCM(playerid, COLOR_RED, "{F2CF09}Car vipname removed with success!");
}
return 1;
}
Yes it can, create a varchar(treated as a string in pawn) with the size of 50+ (dunno what length u want) column and do what you usually do when you load / save player data
|
Ah ok, but i don't know too much about MySQL :/
I will try and if i got an error i will post it here |
You can create new columns easily, you dont have to create them for every single tupel.
You just change the tables structure by doing that: http://www.w3schools.com/sql/sql_alter.asp |