Vice City Multiplayer
VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: Fuzzy168 on July 16, 2011, 07:59:00 pm
-
Here are the following commands that I need help. I don't know how to do and I can't find any tutorial.
/c tempban
- A command where no one can bring a player to their location? Example: /c nobring
And how to set timer?
-/c teleport (/c goto) / 5 seconds
-/c tempfreeze / 20 seconds
-/c cloak / 10 seconds (Stand still. If move, cancel)
And,
/c banip - HOW?
-
-/c teleport (/c goto) / 5 seconds
Add this TimeGoto and Playertogoto at enum phrase
[pawn]TimeGoto,
PlayerToGoto[256],[/pawn]
And this one at OnPlayerText
[pawn] else if (strcmp(cmd, "!goto", true) == 0) {
tmp = strtok(cmdtext, idx);
if (IsPlayerInfo(playerid,cmd)) return 0;
else if (GetPlayerSpawn(playerid) == 0) MessagePM(playerid, GREEN,"[Error] - First spawn and then use it.");
else if (GetPlayerHP(playerid) <= 99) MessagePMFormat(playerid, GREEN,"You have %d HP, only with 100 can teleported.",GetPlayerHP(playerid));
else if (!strlen(tmp)) MessagePMFormat(playerid, GREEN,"[Syntax] - The correct use: %s <playerid/name>.",cmdtext);
else if (pInfo[playerid][TimeGoto] == 1) MessagePM(playerid, GREEN,"[Error] - You already have in process a goto.");
else {
plr = FindPlayerIDFromString(tmp);
if (plr == INACTIVE_PLAYER_ID) MessagePM(playerid, GREEN,"[Error] - Unknonw player, try another.");
else if (GetPlayerSpawn(plr) == 0) MessagePMFormat(playerid, GREEN,"[Error] - %s has isn't spawned.",gPlayers[plr]);
else if (GetPlayerNogoto(plr) == 1) MessagePMFormat(playerid, GREEN,"[Error] - %s have Nogoto ON.",gPlayers[plr]);
else {
format(MSN,256,"%s",gPlayers[plr]);
pInfo[playerid][PlayerToGoto] = MSN;
pInfo[playerid][TimeGoto] = 1;
SetTimer("SetGotoTime",8000,0);
MessagePM(playerid, GREEN,"Wait 8 seconds to prevent death evade...");
}
}
return 1;
}[/pawn]
-
-/c teleport (/c goto) / 5 seconds
Add this TimeGoto and Playertogoto at enum phrase
[pawn]TimeGoto,
PlayerToGoto[256],[/pawn]
And this one at OnPlayerText
[pawn] else if (strcmp(cmd, "!goto", true) == 0) {
tmp = strtok(cmdtext, idx);
if (IsPlayerInfo(playerid,cmd)) return 0;
else if (GetPlayerSpawn(playerid) == 0) MessagePM(playerid, GREEN,"[Error] - First spawn and then use it.");
else if (GetPlayerHP(playerid) <= 99) MessagePMFormat(playerid, GREEN,"You have %d HP, only with 100 can teleported.",GetPlayerHP(playerid));
else if (!strlen(tmp)) MessagePMFormat(playerid, GREEN,"[Syntax] - The correct use: %s <playerid/name>.",cmdtext);
else if (pInfo[playerid][TimeGoto] == 1) MessagePM(playerid, GREEN,"[Error] - You already have in process a goto.");
else {
plr = FindPlayerIDFromString(tmp);
if (plr == INACTIVE_PLAYER_ID) MessagePM(playerid, GREEN,"[Error] - Unknonw player, try another.");
else if (GetPlayerSpawn(plr) == 0) MessagePMFormat(playerid, GREEN,"[Error] - %s has isn't spawned.",gPlayers[plr]);
else if (GetPlayerNogoto(plr) == 1) MessagePMFormat(playerid, GREEN,"[Error] - %s have Nogoto ON.",gPlayers[plr]);
else {
format(MSN,256,"%s",gPlayers[plr]);
pInfo[playerid][PlayerToGoto] = MSN;
pInfo[playerid][TimeGoto] = 1;
SetTimer("SetGotoTime",8000,0);
MessagePM(playerid, GREEN,"Wait 8 seconds to prevent death evade...");
}
}
return 1;
}[/pawn]
Doesn't work like that you have 2 options:-
1)tell fuzzy to take it from madara's that got all functions dfined
2)or paste all the functions and stuff for him (MessagePm,timer function defiend etc);