Jump to content

Ajutor Modificare Comanda


AlexanderSMG

Recommended Posts

Buna ziua,va rog frumos stiu ca este ceva banal pentru un scripter cat de cat experimentat  vreau si eu sa faceti in asa fel incat daca dau odata /vipname sa nu mearga sa dau iar /vipname pana nu dau /removename,adica mai explicat dupa ce dau /vipname ca sa pot da iar aceasta comanda sa imi ceara sa dau /removename,uitati comenzile:

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][pVIP] == 1)
    {
        if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER && GetPlayerState(playerid) != PLAYER_STATE_PASSENGER) return SCM(playerid, COLOR_WHITE, "Nu esti intr-un vehicul.");
        if(OwnedVeh(vehicleid))
        {
        vText = CreateObject(19327, -2597.0762, -2638.4270, -5.3536, -87.6999, 90.4001, -87.1805);
        SetObjectMaterialText(vText, text, 0, 50, "Arial", 25, 1, 0xFFFFFFFF, 0, 1);
        AttachObjectToVehicle(vText, vehicleid, 0.0,-1.9, 0.3, 270.0, 0.0, 0.0);
        format(szMessage, sizeof(szMessage), "{F2CF09}Text pentru vehicul setat: '%s'", text);
        SCM(playerid, COLOR_YELLOW, szMessage);
        }
    }
    return 1;
}
CMD:removename(playerid, params[])
{
    new szMessage[256];
    new vehicleid = GetPlayerVehicleID(playerid);
    if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER && GetPlayerState(playerid) != PLAYER_STATE_PASSENGER) return SCM(playerid, COLOR_WHITE, "Nu esti intr-un vehicul.");
    if(OwnedVeh(vehicleid))
    if(PlayerInfo[playerid][pVIP] == 1)
    {
       DestroyObject(vText);
       format(szMessage, sizeof(szMessage), "{F2CF09}Text-ul setat pe masina a fost sters cu succes.");
       SCM(playerid, COLOR_RED, szMessage);
    }
    return 1;
}

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.