- 0
Port Location
-
Similar Content
-
- 0 replies
- 329 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
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.
Question
Pinki950
Nick: Pinki950
Problema: Cum as putea pune la comanda de mai jos si Interiorul (X, Y, Z, Interior-ID)
[pawn]COMMAND:portloc(playerid, params[])
{
// Setup local variables
new Float:x, Float:y, Float:z, PortMsg[128];
// Send the command to all admins so they can see it
SendAdminText(playerid, "/portloc", params);
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Check if the player's admin-level is at least 1
if (APlayerData[playerid][PlayerLevel] >= 1)
{
// Check if the player has a wanted level of less than 3
if (GetPlayerWantedLevel(playerid) < 3)
{
// Check if the player is not jailed
if (APlayerData[playerid][PlayerJailed] == 0)
{
if (sscanf(params, "fff", x, y, z)) SendClientMessage(playerid, 0xFF0000AA, "Ex: \"/portloc <x> <y> <z>\"");
else
{
// Port the player to the given location
SetPlayerPos(playerid, x, y, z);
// Let the player know about it
format(PortMsg, 128, "Te-ai teleportat la locatia: %4.2f, %4.2f, %4.2f", x, y, z);
SendClientMessage(playerid, 0x00FF00FF, PortMsg);
}
}
else
SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Nu poti utiliza /portloc at cand esti in inchisoare");
}
else
SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Nu poti utiliza /portloc at cand esti urmarit");
}
else
return 0;
}
else
return 0;
// Let the server know that this was a valid command
return 1;
}[/pawn]
Link to comment
Share on other sites
2 answers to this question
Recommended Posts